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

Confidence Intervals for Spearman's correlation #80

Closed
TarandeepKang opened this issue May 18, 2020 · 7 comments
Closed

Confidence Intervals for Spearman's correlation #80

TarandeepKang opened this issue May 18, 2020 · 7 comments

Comments

@TarandeepKang
Copy link

I am aware of two methods for the calculation of confidence intervals for a Spearman correlation.

Bootstrap- eg using the spearmanRho function in the rcompanion package

Jackknife using https://cran.r-project.org/web/packages/spearmanCI/spearmanCI.pdf

Others were discussed in our recent Twitter thread. I am happy to help with the implementation in any way I can.

@tsbaguley
Copy link

I'm not convinced that bootstrap CIs are ideal here. Using the Fisher z transformation is traditional. However, it turns out that this has weaknesses. I've coded up a few approaches here:

https://rpubs.com/seriousstats/616206

This includes a CI for tau based on Fieller et al. (1957) and several approaches for rho based on Fieller et al. Bonett & Wright (2000) and Bishara & Hittner (2017). In principle the rank approach might also work for tau but I haven't seen any simulations for that.

@DominiqueMakowski
Copy link
Member

@tsbaguley that's very helpful. Do you mind if we use this for this package?

@tsbaguley
Copy link

Not at all - please do.

@DominiqueMakowski
Copy link
Member

@TarandeepKang it has been added, please do try it out :)

Thanks again @tsbaguley, do not hesitate to double-check if the implementation is okay!

@TarandeepKang
Copy link
Author

TarandeepKang commented May 19, 2020

That is fantastic! Thank you very much indeed! Which of @tsbaguley's methods did did you implement in the end? Just so I know which citations to provide in my paper. :) Again, thank you to everyone involved!

@DominiqueMakowski
Copy link
Member

by default it uses Fieller et al., 1957 's correction (as per Bishara and Hittner, 2017), but it can be overridden by setting correction='bw' or correction='none'

@TarandeepKang
Copy link
Author

Something strange has happened. I checked for any updates using the GitHub install command, and they appear to have lost access to these features.

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

No branches or pull requests

3 participants