enacopula(u, cop, method = c("mle", "smle", "dmle", "mde.chisq.CvM", "mde.chisq.KS", "mde.gamma.CvM", "mde.gamma.KS", "tau.tau.mean", "tau.theta.mean", "beta"), n.MC = if (method == "smle") 10000 else 0, interval = initOpt(cop@copula@name), xargs = list(), ...)
pobs
first in order to obtain u
.outer_nacopula
to be estimated
(currently only Archimedean copulas are provided).character
string specifying the
estimation method to be used, which has to be one (or a unique
abbreviation) of
"mle"
.emle
.
"smle"
.emle
, where
n.MC
gives the Monte Carlo sample size.
"dmle"
edmle
.
"mde.chisq.CvM"
emde
.
"mde.chisq.KS"
emde
.
"mde.gamma.CvM"
emde
.
"mde.gamma.KS"
emde
.
"tau.tau.mean"
"tau.theta.mean"
"beta"
method = "smle"
: integer
,
sample size for simulated maximum likelihood estimation."tau.tau.mean"
and "tau.theta.mean"
.optimize
.enacopula
serves as a wrapper for the different
implemented estimators and provides a uniform framework to utilize
them. For more information, see the single estimators as given in the
section See Also. Note that Hofert, Mächler, and McNeil (2013) compared these
estimators. Their findings include a rather poor performance and numerically
challenging problems of some of these estimators. In particular, the
estimators obtained by method="mde.gamma.CvM"
,
method="mde.gamma.KS"
, method="tau.theta.mean"
, and
method="beta"
should be used with care (or not at all). Overall, MLE
performed best (by far).
Hofert, M., Mächler, M., and McNeil, A. J. (2013). Archimedean Copulas in High Dimensions: Estimators and Numerical Challenges Motivated by Financial Applications. Journal de la Société Française de Statistique 154(1), 25--63.
emle
which returns an object of "mle"
providing useful methods not available for other estimators.
demo(opC-demo)
and demo(GIG-demo)
for
examples of two-parameter families.
edmle
for the diagonal maximum likelihood estimator.
emde
for the minimum distance estimators.
etau
for the estimators based on Kendall's tau.
ebeta
for the estimator based on Blomqvist's beta.
tau <- 0.25
(theta <- copGumbel@iTau(tau)) # 4/3
d <- 12
(cop <- onacopulaL("Gumbel", list(theta,1:d)))
set.seed(1)
n <- 100
U <- rnacopula(n, cop)
meths <- eval(formals(enacopula)$method)
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]])
}
t(res <- sapply(meths, fun, u=U, cop=cop, theta=theta))
Run the code above in your browser using DataLab