Learn R Programming

copula (version 0.999-7)

dDiag: Density of the Diagonal of (Nested) Archimedean Copulas

Description

Evaluate the density of the diagonal of a $d$-dimensional (nested) Archimedean copula. Note that the diagonal of a copula is a cumulative distribution function. Currently, only Archimedean copulas are implemented.

Usage

dDiag(u, cop, log=FALSE)

Arguments

u
a numeric vector of evaluation points.
cop
a (nested) Archimedean copula object of class "outer_nacopula". This also determines the dimension via the comp slot
log
logical indicating if the log of the density of the diagonal should be returned instead of just the diagonal density.

Value

  • A numeric vector containing the values of the density of the diagonal of the Archimedean copula at u.

References

Hofert, M., Mächler{Maechler}, M., and McNeil, A. J. (2011a), Estimators for Archimedean copulas in high dimensions: A comparison, submitted.

See Also

acopula class, dnacopula.

Examples

Run this code
th. <- c(0.1, 0.2, 0.5, 0.8, 1.4, 2., 5.)
curve(dDiag(x, cop=onacopulaL("Clayton", list(th.[1], 1:3))), 0, 1,
      n=1000, ylab="dDiag(x, *)", main="Diagonal densities of Clayton")
abline(h=0, lty=3)
for(j in 2:length(th.))
  curve(dDiag(x, cop=onacopulaL("Clayton", list(th.[j], 1:3))), add=TRUE,
	     col=j, n=1000)
legend("topleft", do.call(expression, lapply(th., function(th)
                                 substitute(theta == TH, list(TH=th)))),
       lty = 1, col=seq_along(th.), bty="n")

Run the code above in your browser using DataLab