Description Usage Arguments Details Value Author(s) References See Also Examples
Methods performing a Gaussian rank correlation test
1 2 3 4 | ## S4 method for signature 'numeric,numeric'
gauss.cor.test(x, y, ...)
## S4 method for signature 'formula,data.frame'
gauss.cor.test(x, y, na.action, ...)
|
x |
a numeric vector or a formula; compulsory argument |
y |
compulsory argument; if |
na.action |
a function which indicates what should happen when the data
contain |
... |
all parameters specified are forwarded internally to the
method |
If called for numeric vectors, gauss.cor.test
performs the
Gaussian gamma rank correlation test for x
and y
. This
is done by simply performing a Pearson correlation test on the normal
scores of the data.
If gauss.cor.test
is called for a formula x
and a data
frame y
, then the method checks whether the formula x
correctly
extracts two columns from y
(see examples below). If so, the
two columns are extracted and the Gaussian gamma rank correlation test
is applied to them according to the specified parameters.
Upon successful completion, the function returns a list of class
htest
containing the results (see cor.test
).
Ulrich Bodenhofer rococo@bioinf.jku.at
http://www.bioinf.jku.at/software/rococo/
K. Boudt, J. Cornelissen and C. Croux (2012). The Gaussian rank correlation estimator: robustness properties. Stat. Comput. 22(2):471-483.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## create data
f <- function(x) ifelse(x > 0.9, x - 0.9, ifelse(x < -0.9, x + 0.9, 0))
x <- rnorm(25)
y <- f(x) + rnorm(25, sd=0.1)
## perform correlation tests
gauss.cor.test(x, y, alternative="greater")
## the formula variant
require(datasets)
data(iris)
gauss.cor.test(~ Petal.Width + Petal.Length, iris,
alternative="two.sided")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.