Permutation based p-value for the Pearson correlation coefficient {Rfast}R Documentation

Permutation based p-value for the Pearson correlation coefficient

Description

Permutation based p-value for the Pearson correlation coefficient.

Usage

permcor(x, y, R = 999) 

Arguments

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.

Details

This is a very low computational calculation of the p-value. Try it yourselves.

Value

A vector consisting of two values, the Pearson correlation and the permutation based p-value.

Author(s)

Marios Dimitriadis and Michail Tsagris

R implementation and documentation: Marios Dimitriadis and Michail Tsagris <kmdimitriadis@gmail.com> and <mtsagris@csd.uoc.gr>

References

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

See Also

pc.skel

Examples

x <- iris[, 1]
y <- iris[, 2]
res<-permcor(x, y)
res<-permcor(x, y, R = 9999)

[Package Rfast version 2.1.0 Index]