Learn R Programming

rococo (version 1.1.10)

gauss.cor: Gauss Rank Correlation Estimator

Description

Compute the Gaussian rank correlation estimate

Usage

gauss.cor(x, y)

Value

Upon successful completion, the function returns the Gaussian rank correlation estimate.

Arguments

x

a numeric vector; compulsory argument

y

a numeric vector; compulsory argument; x and y need to have the same length

Author

Ulrich Bodenhofer

Details

gauss.cor computes the Gaussian rank correlation estimate for x and y.

Note that gauss.cor only works for x and y being numeric vectors, unlike the classical correlation measures implemented in cor which can also be computed for matrices or data frames.

References

https://github.com/UBod/rococo

K. Boudt, J. Cornelissen, and C. Croux (2012). The Gaussian rank correlation estimator: robustness properties. Stat. Comput. 22(2):471-483. DOI: tools:::Rd_expr_doi("10.1007/s11222-011-9237-0").

See Also

gauss.cor.test

Examples

Run this code
## 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)

## compute correlation
gauss.cor(x, y)

Run the code above in your browser using DataLab