View source: R/liouville_extreme.R
K.plot | R Documentation |
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.
K.plot(data, add = F, ...)
data |
a |
add |
whether to superimpose lines to an existing graph. Default to |
... |
additional arguments passed to |
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.
The Kendall plot corresponding to the data at hand
Pr. Christian Genest (the code was adapted for the multivariate case)
Genest & Boies (2003). Detecting Dependence with Kendall Plots, The American Statistician, 57(4), 275–284.
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.