help >

**Spearman Correlation**Showing 1-2 of 2 posts

May 19, 2021 04:05 AM | Diego Ramírez

Spearman Correlation

I want to study the association between FC and a behavioral measure
with NBS. I am wondering if I can perform the univariate step of
NBS as a spearman correlation by ranking the data (each FC edge and
the behavioral measure) prior to entering it into the analysis, is
that right? If that's the case, would it still make sense to add
other covariates or should the design matrix be just the intercept
and the behavioral measure of interest? Although NBS is
nonparametric, the effect sizes could be different when working
with ranked data and should be less susceptible to outliers, and I
guess ranks make a bit more sense for some behavioral measures too.

Sorry if this has been asked before or if the answer is obvious!. Thanks in advance

edit: i also have two other off-topic questions:

1) Can we set a random seed inside an NBS script to make the results reproducible?

2) How does the one-sample test threshold works? My guess is that its a threshold for the raw FC values of the matrices rather than a t or f value?

Diego

Sorry if this has been asked before or if the answer is obvious!. Thanks in advance

edit: i also have two other off-topic questions:

1) Can we set a random seed inside an NBS script to make the results reproducible?

2) How does the one-sample test threshold works? My guess is that its a threshold for the raw FC values of the matrices rather than a t or f value?

Diego

May 20, 2021 07:05 AM | Andrew Zalesky

RE: Spearman Correlation

Hi Diego,

yes - if you normalize the ranks (subtract mean and divide by standard deviation), the beta coefficient from the NBS will approximate the Spearman rank correlation coefficient. I write approximation because Spearman may treat tied ranks differently. Including covariates is fine but this won't strictly be a rank correlation anymore.

1) Yes that's possible, but this would need careful inspection of the code to ensure there are not other re-seeding of the number generator.

2) I think that the threshold is still a t-statistic. Note that one-sample is rarely used.

Andrew

An alternative is to explicitly remove outliers.

yes - if you normalize the ranks (subtract mean and divide by standard deviation), the beta coefficient from the NBS will approximate the Spearman rank correlation coefficient. I write approximation because Spearman may treat tied ranks differently. Including covariates is fine but this won't strictly be a rank correlation anymore.

1) Yes that's possible, but this would need careful inspection of the code to ensure there are not other re-seeding of the number generator.

2) I think that the threshold is still a t-statistic. Note that one-sample is rarely used.

Andrew

An alternative is to explicitly remove outliers.

*Originally posted by Diego Ramírez:*I want to study the association between FC and a
behavioral measure with NBS. I am wondering if I can perform the
univariate step of NBS as a spearman correlation by ranking the
data (each FC edge and the behavioral measure) prior to entering it
into the analysis, is that right? If that's the case, would it
still make sense to add other covariates or should the design
matrix be just the intercept and the behavioral measure of
interest? Although NBS is nonparametric, the effect sizes could be
different when working with ranked data and should be less
susceptible to outliers, and I guess ranks make a bit more sense
for some behavioral measures too.

Sorry if this has been asked before or if the answer is obvious!. Thanks in advance

edit: i also have two other off-topic questions:

1) Can we set a random seed inside an NBS script to make the results reproducible?

2) How does the one-sample test threshold works? My guess is that its a threshold for the raw FC values of the matrices rather than a t or f value?

Diego

Sorry if this has been asked before or if the answer is obvious!. Thanks in advance

edit: i also have two other off-topic questions:

1) Can we set a random seed inside an NBS script to make the results reproducible?

2) How does the one-sample test threshold works? My guess is that its a threshold for the raw FC values of the matrices rather than a t or f value?

Diego