dnacopula | R Documentation |
For a (nested) Archimedean copula (object of class nacopula
)
x
, dCopula(u, x)
(or also currently still dnacopula(x, u)
)
evaluates the density of x
at the given vector or matrix u
.
## S4 method for signature 'matrix,nacopula'
dCopula(u, copula, log=FALSE, ...)
## *Deprecated*:
dnacopula(x, u, log=FALSE, ...)
copula , x |
an object of class |
u |
argument of the copula x. Note that u can be a matrix in which case the density is computed for each row of the matrix and the vector of values is returned. |
log |
logical indicating if the |
... |
optional arguments passed to the copula's |
If it exists, the density of an Archimedean copula C
with
generator \psi
at \bm{u}\in(0,1)^d
is given by
c(\bm{u})=\psi^{(d)}(\psi^{-1}(u_1)+\dots+\psi^{-1}(u_d))
\prod_{j=1}^d(\psi^{-1}(u_j))^\prime
= \frac{\psi^{(d)}(\psi^{-1}(u_1)+\dots+\psi^{-1}(u_d))}{
\prod_{j=1}^d\psi^\prime(\psi^{-1}(u_j))}.
A numeric
vector containing the values of the density of the
Archimedean copula at u
.
dCopula(u, copula)
is a generic function with
methods for all our copula classes, see dCopula
.
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.
For more details about the derivatives of an Archimedean generator,
see, for example, absdPsi
in class acopula
.
## Construct a twenty-dimensional Gumbel copula with parameter chosen
## such that Kendall's tau of the bivariate margins is 0.25.
theta <- copJoe@iTau(.25)
C20 <- onacopula("J", C(theta, 1:20))
## Evaluate the copula density at the point u = (0.5,...,0.5)
u <- rep(0.5, 20)
dCopula(u, C20)
## the same with Monte Carlo based on 10000 simulated "frailties"
dCopula(u, C20, n.MC = 10000)
## Evaluate the exact log-density at several points
u <- matrix(runif(100), ncol=20)
dCopula(u, C20, log = TRUE)
## Back-compatibility check
stopifnot(identical( dCopula (u, C20), suppressWarnings(
dnacopula(C20, u))),
identical( dCopula (u, C20, log = TRUE), suppressWarnings(
dnacopula(C20, u, log = TRUE))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.