Learn R Programming

copula (version 0.999-7)

archmCopula: Construction of Archimedean Copula Class Object

Description

Constructs an Archimedean copula class object with its corresponding parameter and dimension.

Usage

archmCopula(family, param = NA_real_, dim = 2, ...)

claytonCopula(param = NA_real_, dim = 2) frankCopula(param = NA_real_, dim = 2) gumbelCopula(param = NA_real_, dim = 2) amhCopula(param = NA_real_, dim = 2) joeCopula(param = NA_real_, dim = 2)

Arguments

family
a character string specifying the family of an Archimedean copula. Currently supported families are "clayton", "frank", "amh", "gumbel", and "joe".
param
number (numeric) specifying the copula parameter.
dim
the dimension of the copula.
...
currently nothing.

Value

  • An Archimedean copula object of class "claytonCopula", "frankCopula", "gumbelCopula", "amhCopula", or "joeCopula".

Details

archmCopula() is a wrapper for claytonCopula(), frankCopula(), gumbelCopula(), amhCopula() and joeCopula. For the Ali-Mikhail-Haq copula family ("amhCopula"), only the bivariate case is available.

The maximum dimension for which the expression of the pdf is available is 6 for the Clayton, Gumbel and Frank families. The cdf expression is always available. It is now recommended to work with the acopula-classed Archimedean copulas, as there is no restriction on the dimension there.

References

R.B. Nelsen (2006), An introduction to Copulas, Springer, New York.

See Also

ellipCopula, evCopula.

acopula-classed Archimedean copulas, such as copClayton, copGumbel, etc.

Examples

Run this code
clayton.cop <- claytonCopula(2, dim = 3)
## scatterplot3d(rCopula(1000, clayton.cop))

frank.3D  <- frankCopula(dim = 3)# with NA parameters
frank.cop <- frankCopula(3)
persp(frank.cop, dCopula)

gumbel.cop <- archmCopula("gumbel", 5)
contour(gumbel.cop, dCopula)

amh.cop <- amhCopula(0.5)
u. <- as.matrix(expand.grid(u=(0:10)/10, v=(0:10)/10, KEEP.OUT.ATTRS=FALSE))
du <- dCopula(u., amh.cop)
stopifnot(is.finite(du) | apply(u. == 0, 1,any)| apply(u. == 1, 1,any))

## A 7-dim Frank copula
frank.cop <- frankCopula(3, dim = 7)
x <- rCopula(5, frank.cop)
## dCopula now *does* work:
dCopula(x, frank.cop)

## A 7-dim Gumbel copula
gumbel.cop <- gumbelCopula(2, dim = 7)
dCopula(x, gumbel.cop)

## A 12-dim Joe copula
joe.cop <- joeCopula(iTau(joeCopula(), 0.5), dim = 12)
dCopula(x, joe.cop)

Run the code above in your browser using DataLab