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)
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"
.
progress
logical indicating if the progress bar should be displayed.
Value
methodname of the test.
data.namea character string giving the name(s) of the data.
statistictest statistics of the parametric test.
permutationsnumber of permutations.
p.valuep-value of the permutation test.
estimatethe estimated correlation coefficient.
alternativea character string describing the alternative hypothesis.
null.valuethe value of the association measure under the null hypothesis, always 0.
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 code# NOT RUN {
x <- rnorm(50)
y <- runif(50)
perm.cor.test(x,y)
# }
Run the code above in your browser using DataLab