nacopula
)
x
, dCopula(u, x)
(or also currently still dnacopula(x, u)
)
evaluates the density of x
at the given vector or matrix u
.## S3 method for class 'matrix,nacopula':
dCopula(u, copula, log=FALSE, \dots)## *Deprecated*:
dnacopula(x, u, log=FALSE, ...)
"outer_nacopula "
.log
of the density
should be returned.dacopula
function (slot), such as n.MC
(non-negative integer) for
possible Monte Carlo evaluation (see dacopula
in
acopula
numeric
vector containing the values of the density of the
Archimedean copula at u
. Hofert, M.,
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))))
Run the code above in your browser using DataLab