perm.cor.test: Permutation Pearson's correlation test
Description
Performs a permutation Pearson's product-moment correlation test.
Usage
perm.cor.test(x, y, alternative = c("two.sided", "less", "greater"),
nperm = 999, progress = TRUE)
Value
- method
name of the test.
- data.name
a character string giving the name(s) of the data.
- statistic
test statistics of the parametric test.
- permutations
number of permutations.
- p.value
p-value of the permutation test.
- estimate
the estimated correlation coefficient.
- alternative
a character string describing the alternative hypothesis.
- null.value
the value of the association measure under the null hypothesis, always 0.
Arguments
- x, y
numeric vectors of data values. x
and y
must have the same length.
- alternative
a character string specifying the alternative hypothesis, must be one of "two.sided"
(default), "greater"
or "less"
.
- nperm
number of permutations.
- progress
logical indicating if the progress bar should be displayed.
Author
Maxime HERVE <maxime.herve@univ-rennes1.fr>
Details
The function deals with the limitted floating point precision, which can bias calculation of p-values based on a discrete test statistic distribution.
Examples
Run this codex <- rnorm(50)
y <- runif(50)
perm.cor.test(x,y)
Run the code above in your browser using DataLab