cCopula {copula} | R Documentation |
Compute the conditional distribution aka conditional copula function, C(u[d] | u[1],..., u[d-1]) of u[d] given u[1],..., u[d-1].
cCopula(u, copula, j.ind=ncol(u), n.MC=0, log=FALSE) ## Deprecated, for Archimedean copulas only: cacopula(u, cop, n.MC=0, log=FALSE)
u |
n x d-matrix; the conditioning is done on the values in the first d-1 columns. |
copula |
any |
j.ind |
indices j>=2 for which C(u[j]|u[1],...,u[j-1]) is computed. |
cop |
|
n.MC |
Monte Carlo sample size; for Archimedean copulas only, used if positive. |
log |
if TRUE the logarithm of the conditional copula function is returned. |
cCopula()
can be seen as a special case of the Rosenblatt
transform which by default computes all conditional distributions.
Conseqently, cCopula()
simply calls rtrafo()
.
Note that sampling aka random number generation from the
conditional distribution can be achieved by
rtrafo(*, inverse=TRUE)
.
numeric
vector of length n containing the
conditional copula function of u[d] given
u[1],...,u[d-1].
For some (but not all) families, this function also makes sense on the boundaries (if the corresponding limits can be computed).
Marius Hofert, Yongsheng Wang, and Martin Maechler
tau <- 0.5 (theta <- copGumbel@iTau(tau)) # 2 d <- 2 # two ways to specify a Gumbel copula: cop <- onacopulaL("Gumbel", list(theta,1:d)) gCop <- gumbelCopula(theta, dim=d) # n <- 1000 set.seed(1) U <- rCopula(n, cop) U. <- cbind(U[,1], cCopula(U, cop=cop)) # should be ~ U[0,1]^2 plot(U.[,1],U.[,2]) stopifnot(all.equal(cacopula(U, cop),# with deprecation warning cCopula (U, cop))) ## more examples: --> ?rtrafo