timecorr
timecorr copied to clipboard
Adding a function to calculating Spearman correlation
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?
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!