What's the easiest way to run permutation tests for a bivariate Pearson correlation matrix in R?
I have tried running MPT.Corr, Multivariate Permutation Test
for Correlations by Urbano Blackford et al., but I am not sure this function is applicable to the problem.
The data contains mainly Likert scale items and time measures. At least one nominal variable needs to be entered as a covariate – i.e. controlled for.
Best Answer
This is fairly simple to do using R code without needing a special function, here is an example:
This uses the
plyr
package to do the permuting within levels of Species to adjust for it.