Copula {copula} | R Documentation |
Density, distribution function, and random generation for a
"copula"
object.
dcopula(copula, u) pcopula(copula, u) rcopula(copula, n)
copula |
a "copula" object. |
u |
a vector of the copula dimension or a matrix with number of rows being the copula dimension, giving the coordinates of the points where the density of distribution function need to be evaluated. |
n |
number of observations to be generated. |
The density function of an Archimedean copula is obtained by differentiating the distribution function symbolically using D.
The distribution function of a t copula uses pmvt from package mvtnorm. The density function of a t copula uses the dmst from package sn.
The random number generator for an Archiimedean copula uses the conditional approach for bivariate case and the Marshal-Olkin (1988) approach for dimension greater than 2.
'dcopula' gives the density, 'pcopula' gives the distribution function, and 'rcopula' generates random variates.
Jun Yan <jyan@stat.uiowa.edu>
Joe (1997), Multivariate Models and Dependence Concepts, Chapman and Hall, London.
Nelsen (1999), An introduction to Copulas, Springer, New York.
copula-class
, ellipCopula
, archmCopula
, fgmCopula
.
norm.cop <- normalCopula(0.5) norm.cop x <- rcopula(norm.cop, 100) plot(x) dcopula(norm.cop, x) pcopula(norm.cop, x) persp(norm.cop, dcopula) contour(norm.cop, pcopula) ## a 3-dimensional normal copula u <- rcopula(normalCopula(0.5, dim = 3), 1000) ## scatterplot3d(u) ## a 3-dimensional clayton copula v <- rcopula(claytonCopula(2, dim = 3), 1000) ## scatterplot3d(v)