Learn R Programming

copBasic (version 1.7.1)

simCOPmicro: Simulate V from U through a Copula by Numerical Derivative Method

Description

Perform simulation of uniform random but coupled variables $V$ from $U$ through a copula (Nelsen, 2006, p. 32) by numerical derivatives of the copula. A more elaborate implementation is available in simCOP. The simCOPmicro function is intended to be an minimalist version for copula simulation---a minimalist version is useful for pedagogic purposes.

Usage

simCOPmicro(u, cop=NULL, para=NULL, ...)

Arguments

u
Nonexceedance probability $u$ in the $X$ direction;
cop
A copula function;
para
Vector of parameters, if needed, to pass to the copula; and
...
Additional arguments to pass should they be needed.

Value

  • Simulated value(s) of nonexceedance probability $v$ are returned based on the nonexceedance probabilities $u$ in argument u.

References

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

See Also

simCOP

Examples

Run this code
simCOPmicro(runif(1), cop=W)   # Frechet lower bound copula
simCOPmicro(runif(1), cop=P)   # Independence copula
simCOPmicro(runif(1), cop=M)   # Frechet upper bound copula
simCOPmicro(runif(1), cop=PSP) # The PSP copula

# Now let us get more complicated and mix two Plackett copulas together using the
# composite2COP as a "compositor." The parameter argument becomes more complex, but is
# passed as shown into composite2COP.
para <- list(cop1=PLACKETTcop,cop2=PLACKETTcop, alpha=0.3,beta=0.5, para1=0.1,para2=50)
simCOPmicro(runif(5), cop=composite2COP, para=para)

Run the code above in your browser using DataLab