Permutation based p-value for the Pearson correlation coefficient | R Documentation |
Permutation based p-value for the Pearson correlation coefficient.
permcor(x, y, R = 999)
x |
A numerical vector with the first variable. |
y |
A numerical vector with the second variable. |
R |
The number of permutations to be conducted; set to 999 by default. |
This is a very low computational calculation of the p-value. Try it yourselves.
A vector consisting of two values, the Pearson correlation and the permutation based p-value.
Marios Dimitriadis and Michail Tsagris
R implementation and documentation: Marios Dimitriadis and Michail Tsagris <kmdimitriadis@gmail.com> and <mtsagris@csd.uoc.gr>
Chatzipantsiou C., Dimitriadis M., Papadakis M. and Tsagris M. (2019). Extremely efficient permutation and bootstrap hypothesis tests using R. To appear in the Journal of Modern Applied Statistical Methods.
https://arxiv.org/ftp/arxiv/papers/1806/1806.10947.pdf
pc.skel
x <- iris[, 1]
y <- iris[, 2]
res<-permcor(x, y)
res<-permcor(x, y, R = 9999)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.