perm.cor.test {jmuOutlier} | R Documentation |
Permutation Test on Correlation
Description
A permutation test is performed based on Pearson and Spearman correlations.
Usage
perm.cor.test(x, y = NULL, alternative = c("two.sided", "less", "greater"),
method = c("pearson", "spearman"), num.sim = 20000)
Arguments
x |
Numeric vector of design variable if |
y |
Numeric vector of response variable, and should be |
alternative |
A character string specifying the alternative hypothesis, and
must be one of |
method |
A character string specifying the type of correlation, and
must be one of |
num.sim |
The number of simulations generated. |
Details
The p-value is estimated by randomly generating the permutations,
and is hence not exact.
The larger the value of num.sim
the more precise the estimate of
the p-value, but also the greater the computing time.
Thus, the p-value is not based on asymptotic approximation.
The output states more details about the permutation test, such as the values of method
and num.sim
.
Value
alternative |
Same as the input. |
p.value |
The p-value of the permutation test. |
Note
The formulas computed within perm.cor.test
are based on the textbook by Higgins (2004).
Author(s)
Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA
References
Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.
See Also
Examples
perm.cor.test( c( 4, 6, 8, 11 ), c( 19, 44, 15, 13 ), "less", "pearson" )
perm.cor.test( c( 4, 6, 8, 11 ), c( 19, 44, 15, 13 ), "less", "spearman" )