emle  R Documentation 
Compute (simulated) maximum likelihood estimators for (nested) Archimedean copulas.
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), ...)
u 
n x dmatrix of (pseudo)observations (each value in [0,1]) from the copula, with n the sample size and d the dimension. 
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 
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 nontrivial 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 100dimensional 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 noncritical to evaluate.
an R object of class "mle2"
(and
thus useful for obtaining confidence intervals) with the
(simulated) maximum likelihood estimator.
list
as returned by
optimize()
including the maximum likelihood
estimator (does not confidence intervals but is typically faster).
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.
mle2
from package bbmle and
mle
from stats4 on which mle2
is
modeled. enacopula
(wrapper for different estimators).
demo(opCdemo)
and demo(GIGdemo)
for
examples of twoparameter families.
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 loglikelihood, 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="loglikelihood", main="loglikelihood 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.