Learn R Programming

lcopula (version 1.0.7)

K.plot: Kendall plot

Description

This function plots the expectation of the order statistics under the null hypothesis of independence against the ordered empirical copula values. The data is transformed to ranks.

Usage

K.plot(data, add = F, ...)

Value

The Kendall plot corresponding to the data at hand

Arguments

data

a n by d matrix of observations

add

whether to superimpose lines to an existing graph. Default to F

...

additional arguments passed to points

Author

Pr. Christian Genest (the code was adapted for the multivariate case)

Details

The function uses integrate and may fail for large d or large n. If \(n>200\), the fallback is to generate a corresponding sample of uniform variates and to compare the empirical copula of the sample generated under the null hypothesis with the one obtained from the sample.

References

Genest & Boies (2003). Detecting Dependence with Kendall Plots, The American Statistician, 57(4), 275--284.

Examples

Run this code
#Independence
K.plot(matrix(runif(2000),ncol=2))
#Negative dependence
K.plot(rCopula(n=1000,claytonCopula(param=-0.5,dim=2)),add=TRUE,col=2)
#Perfect negative dependence
K.plot(rCopula(n=1000,claytonCopula(param=-1,dim=2)),add=TRUE,col=6)
#Positive dependence
K.plot(rCopula(n=1000,claytonCopula(param=iTau(claytonCopula(0.3),0.5),dim=2)),add=TRUE,col=3)
#Perfect positive dependence
K.plot(rCopula(n=1000,claytonCopula(param=iTau(claytonCopula(0.3),1),dim=2)),add=TRUE,col=4)

Run the code above in your browser using DataLab