Learn R Programming

copBasic (version 1.7.1)

derCOPinv2: Numerical Derivative Inverse of a Copula for U with respect to V

Description

Compute the inverse of a numerical partial derivative for $U$ with respect to $V$ of a copula or $$t = c_v(u) = \frac{\delta \mathbf{C}(u,v)}{\delta v}\mbox{,}$$ and solving for $u$. Nelsen (2006, pp. 13, 40--41) shows that this inverse is quite important for random variable generation. This function is not vectorized.

Usage

derCOPinv2(cop=NULL, v, t, delv=.Machine$double.eps^0.50, para=NULL, ...)

Arguments

cop
A copula function;
v
A single nonexceedance probability $v$ in the $Y$ direction;
t
A single nonexceedance probability level $t$;
delv
The $\Delta v$ interval for the derivative;
para
Vector of parameters or other data structure, if needed, to pass to cop; and
...
Additional arguments to pass to the copula.

Value

  • Value(s) for the derivative inverse are returned.

References

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

See Also

derCOP2

Examples

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

# Simulate 1000 values from product (independent) copula
plot(c(0,1),c(0,1), type="n")
for(i in 1:1000) {
   v <- runif(1); t <- runif(1); u <- derCOPinv2(cop=P,v,t)
   points(u,v, cex=0.5, pch=16) # black dots
}
# Now simulate 1000 from the PSP copula and note the lower tail
# dependence, but absence of upper tail dependence.
for(i in 1:1000) {
   v <- runif(1); t <- runif(1); u <- derCOPinv2(cop=PSP,v,t)
   points(u,v, cex=0.5, pch=16, col=2) # red dots
}

Run the code above in your browser using DataLab