## Do these data come from an extreme-value copula?
set.seed(63)
uG <- rCopula(100, gumbelCopula (3))
uC <- rCopula(100, claytonCopula(3))
## these two take 21 sec on nb-mm4 (Intel Core i7-5600U @ 2.60GHz):
evTestA(uG)
evTestA(uC) # significant even though Clayton is *NOT* an extreme value copula
## These are fast:
evTestA(uG, derivatives = "Cn")
evTestA(uC, derivatives = "Cn") # small p-value even though Clayton is *NOT* an EV copula.
set.seed(34)
tG <- evTestA(uG[1:10,])
tC.A <- evTestA(uC[1:12,])
tC.C <- evTestA(uC[1:20,], derivatives = "Cn")
stopifnot(
all.equal(tG $p.value, 27/2002, tolerance= 1e-15),
all.equal(tC.C$p.value, 1/182 , tolerance= 1e-15),
all.equal(tC.C$p.value, tC.A$p.value, tolerance = 1e-15) # in < 10% of cases
)
Run the code above in your browser using DataLab