gauss.cor.test-methods: Gaussian rank correlation test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Methods performing a Gaussian rank correlation test

Usage

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, ...)

Arguments

x

a numeric vector or a formula; compulsory argument

y

compulsory argument; if x is a vector, y must be vector of the same length as x. If x is a formula, y must be a data frame.

na.action

a function which indicates what should happen when the data contain NA's. Defaults to getOption("na.action").

...

all parameters specified are forwarded internally to the method cor.test, in particular, the alternative parameter.

Details

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.

Value

Upon successful completion, the function returns a list of class htest containing the results (see cor.test).

Author(s)

Ulrich Bodenhofer rococo@bioinf.jku.at

References

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.

See Also

gauss.cor

Examples

 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")

UBod/rococo documentation built on May 25, 2019, 3:58 a.m.