Learn R Programming

copBasic (version 1.5.1)

diagCOP: The Diagonals of a Copula

Description

Compute the primary or secondary diagonals of copula $\mathbf{C}(u,v)$. The primary diagonal is $$\mathbf{\delta}_\mathbf{C}(t) = \mathbf{C}(t,t)\mbox{, and}$$ the secondary diagonal is $$\mathbf{\delta}_\mathbf{C}(t) = \mathbf{C}(t,1-t)\mbox{.}$$

Usage

diagCOP(cop=NULL, para=NULL, secondary=FALSE,
        ploton=TRUE, lines=TRUE, delt=0.005, ...)

Arguments

cop
A copula function;
para
Vector of parameters, if needed, to pass to the copula;
secondary
A logical to toggle the secondary diagonal;
ploton
A logical to toggle on the plot;
lines
Draw the lines of diagonal to the current device;
delt
The increment of the level curves to plot, defaults to 5-percent intervals; and
...
Additional arguments to pass to the plot() and lines() functions.

Value

  • A list of the $\mathbf{\delta}_\mathbf{C}(t,t)$ (primary diagonal) or $\mathbf{\delta}_\mathbf{C}(t,1-t)$ (secondary diagonal) for the t values are returned.

References

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

See Also

COP, sectionCOP

Examples

Run this code
# Compute and show the primary diagonal of the W, P, M, and PSP
# copulas on the same plot
D <- diagCOP(cop=W,   lwd=2)
D <- diagCOP(cop=P,   lty=2, ploton=FALSE)
D <- diagCOP(cop=M,   col=2, ploton=FALSE)
D <- diagCOP(cop=PSP, col=3, ploton=FALSE)
mtext("PRIMARY DIAGONAL OF SIMPLE COPULAS")

# Compute and show the secondary diagonal of the W, P, M, and PSP
# copulas on the same plot
D <- diagCOP(cop=W,   lwd=2, secondary=TRUE)
D <- diagCOP(cop=P,   lty=2, secondary=TRUE, ploton=FALSE)
D <- diagCOP(cop=M,   col=2, secondary=TRUE, ploton=FALSE)
D <- diagCOP(cop=PSP, col=3, secondary=TRUE, ploton=FALSE)
mtext("SECONDARY DIAGONAL OF SIMPLE COPULAS")

Run the code above in your browser using DataLab