Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rank-based statistics to Series.correlation() #475

Closed
CommonClimate opened this issue Nov 17, 2023 · 2 comments
Closed

Add rank-based statistics to Series.correlation() #475

CommonClimate opened this issue Nov 17, 2023 · 2 comments

Comments

@CommonClimate
Copy link
Collaborator

CommonClimate commented Nov 17, 2023

Currently, Series.correlation() only supports Pearson's product-moment correlation as metric of similarity. This is the only possible statistic for the 'ttest' option. However, the two Monte Carlo tests (isospectral and isopersistent) can use any statistic, particularly Spearman's rho and Kendall's tau, which are rank-based and therefore more resistant to outliers.

The idea is to use the same AR(1) or phase-scrambled surrogates (see #228) to general the null distribution. For a student project, it may be useful to validate those against the asymptotic distribution of those statistics.

@CommonClimate CommonClimate self-assigned this Nov 17, 2023
@CommonClimate CommonClimate changed the title Add more statistics to Series.correlation() Add rank-based statistics to Series.correlation() Nov 17, 2023
@alexkjames alexkjames self-assigned this Jan 4, 2024
@CommonClimate
Copy link
Collaborator Author

Update: it would make sense to enable any of the correlation methods supported by scipy, using the same nomenclature. Example:
corr = ts1.correlation(ts2, statistic = "kendalltau") or corr = ts1.correlation(ts2, statistic = "spearmanr").
Default statistic should be 'pearsonr'. The function will need a check that the supplied string matches the list of allowable methods under scipy.stats.

@khider
Copy link
Member

khider commented Feb 9, 2024

Depends on solving issue #228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants