sectionCOP: The Sections or Derivative of the Sections of a Copula

sectionCOPR Documentation

The Sections or Derivative of the Sections of a Copula

Description

Compute the copula sections or the (partial) derivatives of copula sections of a copula (Nelsen, 2006, pp. 12–14). The horizontal section at V=a (a constant) is

t \mapsto \mathbf{C}(t,a)\mbox{, and}

the vertical section at U=a (a constant, with respect to V or wrtV=TRUE) is

t \mapsto \mathbf{C}(a,t)\mbox{.}

The partial derivatives of the copula sections are conditional cumulative distribution functions (see derCOP and derCOP2). The derivatives are constrained as

0 \le \frac{\delta}{\delta u}\mathbf{C}(u,v) \le 1\mbox{, and}

0 \le \frac{\delta}{\delta v}\mathbf{C}(u,v) \le 1\mbox{.}

Usage

sectionCOP(f, cop=NULL,  para=NULL, wrtV=FALSE, dercop=FALSE, delt=0.005,
              ploton=TRUE, lines=TRUE, xlab="NONEXCEEDANCE PROBABILITY", ...)

Arguments

f

A single value of nonexceedance probability u or v along the horizontal U axis or vertical V axis of the unit square \mathcal{I}^2;

cop

A copula function;

para

Vector of parameters, if needed, to pass to the copula;

wrtV

A logical to toggle between with respect to v or u (default). The default provides the vertical section whereas the horizontal comes from wrtV = TRUE;

dercop

A logical that triggers the derivative of the section;

delt

The increment of the level curves to plot, defaults to 5-percent intervals;

ploton

A logical to toggle on the plot;

lines

Draw the lines of diagonal to the current device;

xlab

A label for the x-axis title passed to plot() in R; and

...

Additional arguments to pass to the plot() and lines() functions in R.

Value

An R list is returned.

t

The nonexceedance probability along the section. The nomenclature t mimics Nelsen (2006) and is not the same as the u or v;

seccop

The section of the copula or its derivative;

wrt

A text string declaring what the setting for wrtV was;

fvalue

The provided value of nonexceedance probability; and

isderivative

A logical stating whether the derivative of the section is seccop.

Author(s)

W.H. Asquith

References

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

See Also

COP, diagCOP

Examples

## Not run: 
# EXAMPLE 1, plot the v=0.55 section and then u=0.55 section, which will overlay
# the other because the PSP is a symmetrical copula
tmp <- sectionCOP(0.55, cop=PSP, ylab="COPULA SECTIONS",  lwd=5, col=2)
tmp <- sectionCOP(0.55, cop=PSP, wrtV=TRUE, ploton=FALSE, lwd=2, col=3)
# now add the v=0.85 section and the u=0.85, again overlay each other
tmp <- sectionCOP(0.85, cop=PSP, ploton=FALSE,             lwd=5, col=2, lty=2)
tmp <- sectionCOP(0.85, cop=PSP, wrtV=TRUE, ploton=FALSE,  lwd=2, col=3, lty=2)#
## End(Not run)

## Not run: 
# EXAMPLE 2, v=0.35 section and derivative (the conditional distribution) function
tmp <- sectionCOP(0.35, cop=PSP, ylab="COPULA SECTIONS OR DERIV.", lwd=5, col=3)
tmp <- sectionCOP(0.35, cop=PSP, dercop=TRUE, ploton=FALSE,               col=3)
# The thin green line represents the cumulative distribution function conditional
# on u = 0.35 from the derCOP function.  Then see Example 3
## End(Not run)

## Not run: 
# EXAMPLE 3 (random selection commented out)
#para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop, alpha=runif(1), beta=runif(1),
#             para1=10^runif(1,min=-4, max=0), para2=10^runif(1,min= 0, max=4))
para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop, alpha=0.7, beta=0.22,
             para1=0.0155, para2=214.4)
txts <- c("Alpha=",    round(para$alpha,    digits=4),
          "; Beta=",   round(para$beta,     digits=4),
          "; Theta1=", round(para$para1[1], digits=5),
          "; Theta2=", round(para$para2[1], digits=2))
layout(matrix(1:2,byrow=TRUE))
D <- simCOP(n=1000, cop=composite2COP, para=para, cex=0.5, col=rgb(0,0,0,0.2), pch=16)
mtext(paste(txts,collapse=""))
#f <- c(runif(1),runif(1))
f <- c(0.2,0.9) # RED is the horizontal section and BLACK is the vertical section
segments(f[1],0,f[1],1, col=2, lwd=2); segments(0,f[2],1,f[2], lwd=2)
ftxt <- c("Sections (thick) and derivatives (thin) at ", f, " nonexceed. prob.")
tmp <- sectionCOP(f[1],cop=composite2COP,para=para, col=2, lwd=4)
tmp <- sectionCOP(f[1],cop=composite2COP,para=para, dercop=TRUE, ploton=FALSE, col=2)
tmp <- sectionCOP(f[2],cop=composite2COP,para=para,wrtV=TRUE,ploton=FALSE,lwd=4)
tmp <- sectionCOP(f[2],cop=composite2COP,para=para,wrtV=TRUE,ploton=FALSE,dercop=TRUE)
mtext(paste(ftxt, collapse=""))
# The thin lines are the CDFs conditional on the respective values of "f". Carefully
# compare the point densities along and near the sections in the top plot to the
# respective shapes of the CDFs in the bottom plot. If the bottom plot were rotated
# 90 degrees clockwise and then reflected top to bottom, the conditional quantile
# function QDF results. Reflection is needed because, by convention, QDFs are monotonic
# increasing to right---functions derCOPinv() and derCOPinv2() provide the CDF inversion.
## End(Not run)

wasquith/copBasic documentation built on Dec. 13, 2024, 6:39 p.m.