tau <- 0.25
(theta <- copGumbel@tauInv(tau)) # 4/3
d <- 20
(cop <- onacopulaL("Gumbel", list(theta,1:d)))
set.seed(1)
n <- 200
U <- rnacopula(n, cop)
(meths <- eval(formals(enacopula)$method)) # "mle", "smle", ...
fun <- function(meth, u, cop, theta){
run.time <- system.time(val <- enacopula(u, cop=cop, method=meth))
list(value=val, error=val-theta, utime.ms=1000*run.time[[1]])
}
(res <- sapply(meths, fun, u=U, cop=cop, theta=theta))
Run the code above in your browser using DataLab