Learn R Programming

copBasic (version 1.5.1)

COP: The Copula

Description

Compute the copula from a copula

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

The copula is an expression of the probability that both $U \le u$ and $V \le v$.

Usage

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

Arguments

cop
A copula function,
u
An nonexceedance probability in X direction,
v
An nonexceedance probability in Y direction, and
...
Additional arguments to pass (such as parameters, if needed, for the copula in the form of a list).

Value

  • The value for the copula is returned.

References

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

See Also

coCOP, surCOP, duCOP, W, P, M, PSP

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 # nonexceedance
bG <- 1 - G # nonexceedance

# 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