Learn R Programming

copula (version 0.999-4)

pnacopula: Evaluation of (Nested) Archimedean Copulas

Description

pnacopula evaluates a (nested) Archimedean copula (object of class nacopula) at the given vector or matrix u.

Usage

pnacopula(x, u)

Arguments

x
(nested) Archimedean copula of dimension $d$, that is, an object of class nacopula, typically from onacopula(..).
u
a numeric vector of length $d$ or matrix with $d$ columns.

Value

  • A numeric in $[0,1]$ which is the copula evaluated at u. (Currently not parallelized.)

Details

The value of an Archimedean copula $C$ with generator $\psi$ at $u$ is given by $$C(\bm{u})=\psi(\psi^{-1}(u_1)+\dots+\psi^{-1}(u_d)),\ \bm{u}\in[0,1]^d.$$ The value of a nested Archimedean copula is defined similarly. Note that a d-dimensional copula is called nested Archimedean if it is an Archimedean copula with arguments possibly replaced by other nested Archimedean copulas.

Examples

Run this code
## Construct a three-dimensional nested Joe copula with parameters
## chosen such that the Kendall's tau of the respective bivariate margins
## are 0.2 and 0.5.
theta0 <- copJoe@iTau(.2)
theta1 <- copJoe@iTau(.5)
C3 <- onacopula("J", C(theta0, 1, C(theta1, c(2,3))))

## Evaluate this copula at the vector u
u <- c(.7,.8,.6)
pnacopula(C3, u)

## Evaluate this copula at the matrix v
v <- matrix(runif(300), ncol=3)
pnacopula(C3, v)

Run the code above in your browser using DataLab