timecorr icon indicating copy to clipboard operation
timecorr copied to clipboard

Adding a function to calculating Spearman correlation

Open BinglinW opened this issue 2 years ago • 1 comments

Hello, I am currently using this toolbox. Because of the data requirements of the Pearson correlation, I wanted to add the ability to calculate the Spearman correlation. After reading the source code, I couldn't find a function to compute Pearson's correlation. Could you give me some guidance?

BinglinW avatar Jan 07 '23 02:01 BinglinW

I'm not sure what you mean by "data requirement" of the Pearson's correlation. But since Spearman's correlations are just Pearson's correlations on the ranks, the "inputs" to both correlations are identical.

Another potential point of misunderstanding is that timecorr computes time varying correlations, not just a single static correlation. In any case, the core correlation computation is done here.

Feel free to clarify or reach out again if I've misinterpreted your questions, or if you have additional questions!

jeremymanning avatar Jan 07 '23 04:01 jeremymanning