Closed ElizabethFongheiser closed 8 months ago
I asked Dr. McGlinn the same question in class today. This is because of the permutations being used to conduct the Mantel test. The permutations are a list of randomly subsampled numbers, and due to the randomness in which they are sampled, they are slightly different numbers each time. This can cause the test's p-value and r value to slightly change because they're being calculated from slightly different numbers each time.
While they do change each time, they should still be roughly the same (like if you first p-value is 0.789, all of the subsequent p-values should be kind of similar, like 0.777, 0.781, 0.715. I guess if your p-values and r values are very different each time then there could be something else wrong.
Thank you @chrisjcarbon ! The only thing I'd say is that your r value will not change as this is the empirically observed test statistic.
I'm running the mantel test on my common species and my rare species. I noticed that each time I run it, the numbers change for the mantel statistics r value and for the significance value. Why is this? Each test is being run with the coordinate distribution and either the rare or common species distribution.
rare_mantel <- mantel(xy_dist, rare_dist) rare_mantel
common_mantel <- mantel(xy_dist, common_dist) common_mantel