Learn R Programming

copula (version 0.99-4)

prob: Computing Probabilities of "nacopula" Objects to Fall in Hypercubes

Description

Compute probabilities of a $d-$dimensional random vector $U$ distributed according to the nested Archimedean copula x to fall in a hypercube $(l,u]$, where $l$ and $u$ denote the lower and upper corners of the hypercube, respectively.

Usage

prob(x, l, u)

Arguments

x
(nested) Archimedean copula of dimension $d$, that is, an object of class nacopula, typically constructed with onacopula(..).
l, u
$d$-dimensional, numeric, lower and upper hypercube boundaries, respectively, satisfying $0 \le l_i \le u_i \le 1$, for $i\in{1,\dots,d}$.

Value

  • A numeric in $[0,1]$ which is the probability $P(l_i< U_i \le u_i)$.

See Also

onacopula() for the construction of nested Archimedean copulas, the class nacopula, and the evaluation of nested Archimedean copulas via pnacopula(.).

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@tauInv(.2)
theta1 <- copJoe@tauInv(.5)
C3 <- onacopula("J", C(theta0, 1, C(theta1, c(2,3))))

## Compute the probability of a random vector distributed according to
## this copula to fall inside the cube with lower point l and upper
## point u.
l <- c(.7,.8,.6)
u <- c(1,1,1)
prob(C3, l, u)

Run the code above in your browser using DataLab