emle {copula} | R Documentation |
Maximum Likelihood Estimators for (Nested) Archimedean Copulas
Description
Compute (simulated) maximum likelihood estimators for (nested) Archimedean copulas.
Usage
emle(u, cop, n.MC=0, optimizer="optimize", method,
interval=initOpt(cop@copula@name),
start=list(theta=initOpt(cop@copula@name, interval=FALSE, u=u)),
...)
.emle(u, cop, n.MC=0,
interval=initOpt(cop@copula@name), ...)
Arguments
u |
|
cop |
|
n.MC |
|
optimizer |
a string or |
method |
only when |
interval |
bivariate vector denoting the interval where optimization takes place. The default is computed as described in Hofert et al. (2012). |
start |
|
... |
additional parameters passed to |
Details
Exact formulas for the generator derivatives were derived in Hofert
et al. (2012). Based on these formulas one can compute the
(log-)densities of the Archimedean copulas. Note that for some
densities, the formulas are numerically highly non-trivial to compute
and considerable efforts were put in to make the computations
numerically feasible even in large dimensions (see the source code of
the Gumbel copula, for example). Both MLE and SMLE showed good
performance in the simulation study conducted by Hofert et
al. (2013) including the challenging 100-dimensional case.
Alternative estimators (see also enacopula
) often used
because of their numerical feasibility, might break down in much
smaller dimensions.
Note: SMLE for Clayton currently faces serious numerical issues and is due to further research. This is only interesting from a theoretical point of view, since the exact derivatives are known and numerically non-critical to evaluate.
Value
- emle
-
an R object of class
"mle2"
(and thus useful for obtaining confidence intervals) with the (simulated) maximum likelihood estimator. - .emle
list
as returned byoptimize()
including the maximum likelihood estimator (does not confidence intervals but is typically faster).
References
Hofert, M., Mächler, M., and McNeil, A. J. (2012). Likelihood inference for Archimedean copulas in high dimensions under known margins. Journal of Multivariate Analysis 110, 133–150.
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.
See Also
mle2
from package bbmle and
mle
from stats4 on which mle2
is
modeled. enacopula
(wrapper for different estimators).
demo(opC-demo)
and demo(GIG-demo)
for
examples of two-parameter families.
Examples
tau <- 0.25
(theta <- copGumbel@iTau(tau)) # 4/3
d <- 20
(cop <- onacopulaL("Gumbel", list(theta,1:d)))
set.seed(1)
n <- 200
U <- rnacopula(n,cop)
## Estimation
system.time(efm <- emle(U, cop))
summary(efm) # using bblme's 'mle2' method
## Profile likelihood plot [using S4 methods from bbmle/stats4] :
pfm <- profile(efm)
ci <- confint(pfm, level=0.95)
ci
stopifnot(ci[1] <= theta, theta <= ci[2])
plot(pfm) # |z| against theta, |z| = sqrt(deviance)
plot(pfm, absVal=FALSE, # z against theta
show.points=TRUE) # showing how it's interpolated
## and show the true theta:
abline(v=theta, col="lightgray", lwd=2, lty=2)
axis(1, pos = 0, at=theta, label=quote(theta[0]))
## Plot of the log-likelihood, MLE and conf.int.:
logL <- function(x) -efm@minuslogl(x)
# == -sum(copGumbel@dacopula(U, theta=x, log=TRUE))
logL. <- Vectorize(logL)
I <- c(cop@copula@iTau(0.1), cop@copula@iTau(0.4))
curve(logL., from=I[1], to=I[2], xlab=quote(theta),
ylab="log-likelihood",
main="log-likelihood for Gumbel")
abline(v = c(theta, efm@coef), col="magenta", lwd=2, lty=2)
axis(1, at=c(theta, efm@coef), padj = c(-0.5, -0.8), hadj = -0.2,
col.axis="magenta", label= expression(theta[0], hat(theta)[n]))
abline(v=ci, col="gray30", lwd=2, lty=3)
text(ci[2], extendrange(par("usr")[3:4], f= -.04)[1],
"95% conf. int.", col="gray30", adj = -0.1)