Description Usage Arguments Details Value Author(s) References Examples
This function performs the nonparametric test of equality between two copulas proposed by Remillard and Scaillet (2009). The test is based on the Cramer-von-Mises statistic between the two empirical copulas. An approximate p-value is returned.
1 |
x |
|
y |
|
Nsim |
Number of iterations used in the approximation of the p-value. |
paired |
|
alpha |
Level of the calculated VaR. Default is 0.95. |
Details of the method can be found in Remillard and Scaillet (2009).
A list of the following objects:
cvm |
Value of the Cramer-von Mises test statistic. |
pvalue |
pvalue based on the multiplier Monte Carlo method
with |
cvmsim |
Simulated values of the Cramer-von Mises statistic. |
VaR |
|
Bruno Remillard and Jean-Francois Plante
Remillard, B. & Scaillet, O. (2009) Testing for equality between two copulas. Journal of Multivariate Analysis, 100, 377-386.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Simulating a bivariate normal (copula = independence)
X=matrix(rnorm(100),ncol=2)
# Simulating a bivriate exponential distribution with a Clayton copula
v=runif(50)
theta=1
x<-1/(1/runif(50)/v^(theta+1))^(1/(theta+1))
u<-(x^(-theta)-v^(-theta)+1)^(-1/theta)
Y=cbind(-log(1-u),-log(1-v))
# Testing equality of the copulas
TwoCop(X,Y)$pvalue
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.