Learn R Programming

rococo (version 1.1.1)

rococo: Robust Gamma Rank Correlation Coefficient

Description

Compute the robust gamma rank correlation coefficient

Usage

rococo(x, y, similarity=c("linear", "exp", "gauss", "epstol", "classical"),
       tnorm="min", r=0)

Arguments

x
a numeric vector; compulsory argument
y
a numeric vector; compulsory argument; x and y need to have the same length
similarity
a character string or a character vector identifying which type of similarity measure to use; valid values are "linear" (default), "exp", "gauss", "epstol", and "classical" (
tnorm
can be any of the following strings identifying a standard tnorm: "min" (minimum t-norm; default), "prod" (product t-norm), or lukasiewicz (Lukasiewicz t-norm); abbreviations are allowed as long as they a
r
numeric vector defining the tolerances to be used; if a single value is supplied, the same value is used both for x and y. If a vector is supplied, r[1] is used as tolerance for x and r

Value

  • Upon successful completion, the function returns the robust gamma rank correlation coefficient.

Details

rococo computes the robust gamma rank correlation coefficient of x and y according to the specified parameters (see literature for more details).

Note that rococo 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

http://www.bioinf.jku.at/software/rococo/ U. Bodenhofer and F. Klawonn (2008). Robust rank correlation coefficients on the basis of fuzzy orderings: initial steps. Mathware Soft Comput. 15(1):5-20.

U. Bodenhofer, M. Krone, and F. Klawonn (2012). Testing noisy numerical data for monotonic association. Inform. Sci., DOI: 10.1016/j.ins.2012.11.026.

See Also

rococo.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
rococo(x, y, similarity="classical")
rococo(x, y, similarity="linear")
rococo(x, y, similarity=c("classical", "gauss"), r=c(0, 0.1))

Run the code above in your browser using DataLab