# simulate from a bivariate Clayton copula
simdata = BiCopSim(300,3,2)
u1 = simdata[,1]
u2 = simdata[,2]
# perform White's goodness-of-fit test for the true copula
BiCopGofTest(u1,u2,family=3)
# perform Kendall's goodness-of-fit test for the Frank copula
BiCopGofTest(u1,u2,family=5)
# perform Kendall's goodness-of-fit test for the true copula
gof = BiCopGofTest(u1,u2,family=3,method="kendall")
gof$p.value.CvM
gof$p.value.KS
# perform Kendall's goodness-of-fit test for the Frank copula
gof = BiCopGofTest(u1,u2,family=5,method="kendall")
gof$p.value.CvM
gof$p.value.KS
Run the code above in your browser using DataLab