Learn R Programming

dsfa (version 2.0.2)

dcop: Copula function

Description

Probablitiy density function, distribution and random number generation for copulas.

Usage

dcop(
  W,
  delta,
  distr = "normal",
  rot = 0,
  deriv_order = 0,
  tri = NULL,
  log.p = FALSE
)

pcop(W, delta = 0, distr = "normal", rot = 0, log.p = FALSE)

rcop(n, delta = 0, distr = "normal", rot = 0)

Value

dcop gives the density, pcop gives the distribution function for a specified copula and rcop generates random numbers, with given delta. dcop() returns a derivs object. For more details see trind and trind_generator.

Arguments

W

numeric matrix of pseudo observations. Must have two columns.

delta

numeric vector of copula parameter \(\delta\).

distr

string, defines the copula family:
`independent` = Independence copula
`normal` = Gaussian copula
`clayton` = Clayton copula
`gumbel` = Gumbel copula
`frank` = Frank copula
`joe` = Joe copula
`amh` = Ali-Mikhail-Haq copula

rot,

integer determining the rotation for Archimedian copulas. Can be 90, 180 or 270.

deriv_order

integer; maximum order of derivative. Available are 0,2 and 4.

tri

optional; index matrix for upper triangular, generated by trind_generator.

log.p

logical; if TRUE, probabilities p are given as log(p).

n

positive integer; number of observations.

Functions

  • pcop(): distribution function for copula.

  • rcop(): random number generation for copula.

Details

A two-dimensional copula \(C(w_1, w_2, \delta)\) is a multivariate cumulative distribution function for which the marginal probability distribution of \(w_1\) and \(w_2\) are uniform on the interval \([0,1]\). The parameter \(\delta\) specifies the copula.

The functions pcop() and rcop() are wrapper functions for the pCopula and rCopula.

References

  • schepsmeier2014derivativesdsfa

  • hofert2018elementsdsfa

See Also

Other copula: cop(), delta_bounds()

Examples

Run this code
u=0.3; v=0.7; p=0.5
pdf <- dcop(W=cbind(u,v), delta=p, distr="normal")
cdf <- pcop(W=cbind(u,v), delta=p, distr="normal")
r <- rcop(n=100, delta=p, distr="normal")

Run the code above in your browser using DataLab