Learn R Programming

copBasic (version 1.7.1)

level.setCOP2: Compute a Level Set of a Copula U with respect to V

Description

Compute a level curve or level set of a copula for $U$ with respect to $V$ (Nelsen, 2006, pp. 12--13). The level curve at level $t$ is defined for $V \mapsto [0+\Delta v, 1-\Delta v, \Delta v]$ by $$t = \mathbf{C}(u, v=V)\mbox{,}$$ and solving for $u$. The function is largely a dispatcher to features implemented in level.curvesCOP2.

Usage

level.setCOP2(cop=NULL, para=NULL, getlevel=NULL, delv=0.001, lines=FALSE, ...)

Arguments

cop
A copula function;
para
Vector of parameters or other data structure, if needed, to pass to the copula;
getlevel
The level set for $t$;
delv
The increment for $\Delta v$. The default is 1 part in 1,000, which should often provide enough smoothness for many copulas in practice;
lines
A logical that matches the argument of the same name in level.curvesCOP2; and
...
Additional arguments to pass to the lines() function of R.

Value

  • The level set for $t$ $=$ getlevel is returned.

concept

  • level curves
  • level curve
  • level sets
  • level set
  • level contours
  • level contour

References

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

See Also

level.setCOP, level.curvesCOP2

Examples

Run this code
set <- level.setCOP2(cop=N4212cop, para=3.1, getlevel=0.75)
# This longer runtime example is expected to throw some uniroot() errors during
# execution of COPinv(). One can see that a few level curves are truncated on the right.
level.curvesCOP2(cop=N4212cop, para=3.1, delv=0.001, delt=0.02)
lines(set$U, set$V, col=2, lwd=2) # manually draw the 75th percentile
set <- level.setCOP2(cop=N4212cop, para=3.1, getlevel=0.17, lines=TRUE, col=4, lwd=4)
# Notice the change in the lines argument and using levelsetCOP2 to draw.
# Perhaps to fix the errors COPinv() should be further developed?

Run the code above in your browser using DataLab