Copula {copula}R Documentation

The Copula Distribution

Description

Density, distribution function, and random generation for a "copula" object.

Usage

dcopula(copula, u)
pcopula(copula, u)
rcopula(copula, n)

Arguments

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.

Details

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.

Value

'dcopula' gives the density, 'pcopula' gives the distribution function, and 'rcopula' generates random variates.

Author(s)

Jun Yan <jyan@stat.uiowa.edu>

References

Joe (1997) Nelsen (1999)

See Also

copulaObject, ellipCopula, archmCopula

Examples

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)

[Package copula version 0.3-8 Index]