We are hiring ! See our job offers.
##### https://github.com/cran/nacopula
Revision 161411bb86f97e5a8bd89091cd61d03a33c2761a authored by Martin Maechler on 06 February 2012, 00:00:00 UTC, committed by Gabor Csardi on 06 February 2012, 00:00:00 UTC
1 parent 5bc804b
Tip revision: 161411b
emde.Rd
\name{emde}
\alias{emde}
\title{Minimum Distance Estimators for (Nested) Archimedean Copulas}
\description{
Compute minimum distance estimators for (nested) Archimedean copulas.
}
\usage{
emde(u, cop,
method=c("mde.chisq.CvM", "mde.chisq.KS",
"mde.gamma.CvM", "mde.gamma.KS"),
interval=initOpt(cop@copula@name),
include.K = FALSE, repara = TRUE, \dots)
}
\arguments{
\item{u}{\eqn{n\times d}{n x d}-matrix of (pseudo-)observations (each
value in \eqn{[0,1]}) from the copula, where \eqn{n} denotes the
sample size and \eqn{d} the dimension.}
\item{cop}{\code{\linkS4class{outer_nacopula}} to be estimated
(currently only Archimedean copulas are provided).}
\item{method}{a \code{\link{character}} string specifying the distance
method, which has to be one (or a unique abbreviation) of
\describe{
\item{\code{"mde.chisq.CvM"}}{map to an Erlang distribution and
using a chi-square distribution and Cram\enc{é}{e}r-von Mises distance;}
\item{\code{"mde.chisq.KS"}}{map to an Erlang distribution and
using a chi-square distribution and Kolmogorov-Smirnov distance;}
\item{\code{"mde.gamma.CvM"}}{map to an Erlang distribution and
using a Erlang distribution and Cram\enc{é}{e}r-von Mises distance;}
\item{\code{"mde.gamma.KS"}}{map to an Erlang distribution and using
a \ifelse{latex}{Kolmogorov-Smir-nov}{Kolmogorov-Smirnov} distance.}

}
The four methods are described in Hofert et al. (2011a); see also the
\sQuote{Details} section.}
\item{interval}{bivariate vector denoting the interval where
optimization takes place.  The default is computed as described in Hofert et al.(2011a).}
\item{include.K}{logical indicating whether the last component, the
(possibly numerically challenging) Kendall distribution function \eqn{K}, is used
(\code{include.K=TRUE}) or not.  Note that the default is
\code{\link{FALSE}} here, where it is \code{TRUE} in the underlying
\item{repara}{logical indicating whether the distance function to be
optimized is reparametrized (the default); see the code for more
details.}
}
\details{
First, \code{\link{htrafo}} is applied to map the \eqn{n\times d}{n x d}-matrix
of given realizations to a \eqn{n\times d}{n x d}-matrix or
\eqn{n\times (d-1)}{n x (d-1)}-matrix, depending on whether the last
component is included (\code{include.K=TRUE}) or not.  Second, using
either the sum of squares of the standard normal quantile function
(\code{method="mde.chisq.CvM"} and
\code{method="mde.chisq.KS"}) or the sum of negative logarithms
(\code{method="mde.gamma.CvM"} and \code{method="mde.gamma.KS"}), a map to a
chi-square or an Erlang distribution is applied, respectively.  Finally, a
Cram\enc{é}{e}r-von Mises (\code{method="mde.chisq.CvM"} and
\code{method="mde.gamma.CvM"}) or Kolmogorov-Smirnov
(\code{method="mde.chisq.KS"} and \code{method="mde.gamma.KS"}) distance is
applied.  This is repeated in an optimization until the copula parameter is
found such that this distance is minimized.

Note that the same transformations as described above are applied for
goodness-of-fit testing; see the \sQuote{See Also} section).
}
\value{
\code{\link{list}} as returned by \code{\link{optimize}}, including the
minimum distance estimator.
}
\author{Marius Hofert}
\references{
Hofert, M., \enc{Mächler}{Maechler}, M., and McNeil, A. J. (2011a),
Estimators for Archimedean copulas in high dimensions: A comparison,
to be submitted.

Hering, C. and Hofert, M. (2011),
Goodness-of-fit tests for Archimedean copulas in large dimensions,
submitted.
}
\seealso{
\code{\link{enacopula}} (wrapper for different estimators),
\code{\link{gnacopula}} (wrapper for different goodness-of-fit tests),
\code{\link{htrafo}} (transformation to a multivariate uniform
distribution),
\code{\link{gtrafouni}} (transformation to a chi-square or Erlang
distribution), and
\code{\link{K}} (Kendall distribution function).
}
\examples{
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(emde)$method)) # "mde.chisq.CvM", ... fun <- function(meth, u, cop, theta){ run.time <- system.time(val <- emde(u, cop=cop, method=meth)$minimum)
list(value=val, error=val-theta, utime.ms=1000*run.time[])
}
(res <- sapply(meths, fun, u=U, cop=cop, theta=theta))
}
\keyword{models} Computing file changes ...
{"ft_lang_label":"__label__en","ft_lang_prob":0.5441637,"math_prob":0.9355377,"size":4389,"snap":"2022-40-2023-06","text_gpt3_token_len":1370,"char_repetition_ratio":0.1354618,"word_repetition_ratio":0.04032258,"special_character_ratio":0.26839826,"punctuation_ratio":0.1628468,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99545854,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-29T20:01:15Z\",\"WARC-Record-ID\":\"<urn:uuid:29af3e5b-5483-4d8d-83fd-cd5903323a07>\",\"Content-Length\":\"55643\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c9a0b5b9-3cb1-4177-81da-c23fb53455d6>\",\"WARC-Concurrent-To\":\"<urn:uuid:d7b43707-3296-4c80-94c7-df4a4b9be99e>\",\"WARC-IP-Address\":\"128.93.166.15\",\"WARC-Target-URI\":\"https://archive.softwareheritage.org/browse/revision/161411bb86f97e5a8bd89091cd61d03a33c2761a/?origin_url=https://github.com/cran/nacopula&path=man/emde.Rd&revision=161411bb86f97e5a8bd89091cd61d03a33c2761a&snapshot=43d8cb0807e9f5b824d974700b8ccdcf16dfef51\",\"WARC-Payload-Digest\":\"sha1:TZKOH2RKTOQKGV6PNXKVLXSJKCGCV4W2\",\"WARC-Block-Digest\":\"sha1:GHZVBCIB65TMKJN5J2XBWEN3H22VHEWA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335365.63_warc_CC-MAIN-20220929194230-20220929224230-00640.warc.gz\"}"}