Learn R Programming

copula (version 0.999-19)

pnacopula: Evaluation of (Nested) Archimedean Copulas

Description

For a (nested) Archimedean copula (object of class '>nacopula) x, pCopula(u, x) (or also currently still pnacopula(x, u)) evaluates the copula x at the given vector or matrix u.

Usage

# S4 method for matrix,nacopula
pCopula(u, copula, …)

## *Deprecated*: pnacopula(x, u)

Arguments

copula, 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.

unused: potential optional arguments passed from and to methods.

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
# NOT RUN {
## 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)
pCopula(u, C3)

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

## Back-compatibility check
stopifnot(identical( pCopula (u, C3), suppressWarnings(
                    pnacopula(C3, u))),
          identical( pCopula (v, C3), suppressWarnings(
                    pnacopula(C3, v))))
# }

Run the code above in your browser using DataLab