This function performs the nonparametric test of equality between two copulas proposed by Remillard and Scaillet (2009). The test is based on the CramervonMises statistic between the two empirical copulas. An approximate pvalue is returned.
1 
x 

y 

Nsim 
Number of iterations used in the approximation of the pvalue. 
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 Cramervon Mises test statistic. 
pvalue 
pvalue based on the multiplier Monte Carlo method
with 
cvmsim 
Simulated values of the Cramervon Mises statistic. 
VaR 

Bruno Remillard and JeanFrancois Plante
Remillard, B. & Scaillet, O. (2009) Testing for equality between two copulas. Journal of Multivariate Analysis, 100, 377386.
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(1u),log(1v))
# Testing equality of the copulas
TwoCop(X,Y)$pvalue

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.