what methods to calculate the correlation (r) and p.value in Mantel_test()
Opened this issue · 1 comments
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
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"
.