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

what methods to calculate the correlation (r) and p.value in Mantel_test() #24

Open
xiaojjia opened this issue May 6, 2024 · 1 comment

Comments

@xiaojjia
Copy link

xiaojjia commented May 6, 2024

Thanks for your great package!

When I perform a mantel_test analysis using the default parameters (mantel_fun = "mantel"), I am a little confused as to how the correlation r-values ​​and p-values ​​are calculated.
After checking the source code, I guessed that the Pearson was used. If so, I would like to know if other methods can be used to calculate the correlation, such as Spearman.

PS: I also tried adding "method='spearman'" to the mantel_test function, but the step ran for more than 2 hours with no results. On the contrary, without adding this parameter, it only took half an hour to complete.

Thanks in advance for your help!

Best!
xiaojjia

@xiaojjia xiaojjia changed the title what methods to calculate the correlation (r) and its p.value in Mantel_test() what methods to calculate the correlation (r) and p.value in Mantel_test() May 6, 2024
@Hy4m
Copy link
Owner

Hy4m commented Aug 7, 2024

Yes, you can set method = "spearman" in mantel_test() function. I suggest setting mantel_fun argument to "mantel.randtest", and it's faster than "mantel".

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

2 participants