Learn R Programming

copBasic (version 1.7.1)

COP: The Copula

Description

Compute the copula or joint distribution function from a copula function and as shown by Nelsen (2006, p. 18) is the joint probability

$$\mathrm{Pr}[U \le u, V \le v] = \mathbf{C}(u,v)\mbox{.}$$

The copula is an expression of the joint probability that both $U \le u$ and $V \le v$. A symmetric copula is one such that $\mathbf{C}(u,v) = \mathbf{C}(v,u)$ otherwise the copula is asymmetric. The copula inversions $t = \mathbf{C}(u=U, v)$ or $t = \mathbf{C}(u, v=V)$ are provided by COPinv and COPinv2, respectively. Perhaps this function is singularly the most important in copBasic.

Usage

COP(u, v, cop=NULL, para=NULL, ...)

Arguments

u
Nonexceedance probability $u$ in the $X$ direction;
v
Nonexceedance probability $v$ in the $Y$ direction;
cop
A copula function with vectorization as in asCOP;
para
Vector of parameters or other data structures, if needed, to pass to the copula; and
...
Additional arguments to pass to the copula.

Value

  • Value(s) for the copula are returned.

References

Nelsen, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.

See Also

coCOP, duCOP, surCOP, surfuncCOP

Examples

Run this code
u <- runif(1); v <- runif(1)
COP(cop=W,u,v); COP(cop=P,u,v); COP(cop=M,u,v); COP(cop=PSP,u,v)

F <- 0.75 # 75th percentile, nonexceedance
G <- 0.20 # 25th percentile, nonexceedance
bF <- 1 - F; bG <- 1 - G  # exceedance

# What is the probability that both X and Y are less than
# 75th and 20th percentiles, respectively?
COP(cop=P,F,G)

# What is the probability that both X and Y are greater than
# 75th and 20th percentiles, respectively?
surCOP(cop=P,bF,bG)

# What is the probability that either X or Y are less than
# the 75th and 20th percentiles, respectively?
duCOP(cop=P,F,G)

# What is the probability that either X or Y are greater than
# the 75th and 20th percentiles, respectively?
coCOP(cop=P,bF,bG)

# Repeat for the PSP copula:
# What is the probability that both X and Y are less than
# 75th and 20th percentiles, respectively?
COP(cop=PSP,F,G)

# What is the probability that both X and Y are greater than
# 75th and 20th percentiles, respectively?
surCOP(cop=PSP,bF,bG)

# What is the probability that either X or Y are less than
# the 75th and 20th percentiles, respectively?
duCOP(cop=PSP,F,G)

# What is the probability that either X or Y are greater than
# the 75th and 20th percentiles, respectively?
coCOP(cop=PSP,bF,bG)

# Both of these summations equal unity
COP(cop=PSP,F,G)      + coCOP(cop=PSP,bF,bG)
surCOP(cop=PSP,bF,bG) + duCOP(cop=PSP,F,G)

F <- 0.99 # 99th percentile, nonexceedance
G <- 0.50 # 50th percentile, nonexceedance
bF <- 1 - F # nonexceedance
bG <- 1 - G # nonexceedance

# What is the probability that both X and Y are less than
# 99th and 50th percentiles, respectively?
COP(cop=P,F,G)

# What is the probability that both X and Y are greater than
# 99th and 50th percentiles, respectively?
surCOP(cop=P,bF,bG)

# What is the probability that either X or Y are less than
# the 99th and 50th percentiles, respectively?
duCOP(cop=P,F,G)

# What is the probability that either X or Y are greater than
# the 99th and 50th percentiles, respectively?
coCOP(cop=P,bF,bG)

Run the code above in your browser using DataLab