Learn R Programming

copula (version 0.99-4)

copFamilies: Specific Archimedean Copula Families ("acopula" Objects)

Description

Specific Archimedean families ("acopula" objects) implemented in the package copula.

These families are classical as from p. 116 of Nelsen (2007). More specifially, see Table 1 of Hofert (2011).

Usage

copAMH
copClayton
copFrank
copGumbel
copJoe

Arguments

Value

  • A "acopula" object.

concept

Copula Family

Details

All these are objects of the formal class "acopula". [object Object],[object Object],[object Object],[object Object],[object Object] Note that staying within one of these Archimedean families, all of them can be nested if two (generic) generator parameters $\theta_0$, $\theta_1$ satisfy $\theta_0\le\theta_1$.

References

Nelsen, R.B. (2007), An Introduction to Copulas (2nd ed.), Springer.

Hofert, M. (2010), Sampling Nested Archimedean Copulas with Applications to CDO Pricing, Suedwestdeutscher Verlag fuer Hochschulschriften AG & Co. KG.

Hofert, M. (2011), Efficiently sampling nested Archimedean copulas, Computational Statistics & Data Analysis 55, 57--70.

Marius Hofert and Martin Mächler{Maechler} (2011), Nested Archimedean Copulas Meet R: The nacopula Package., Journal of Statistical Software 39(9), 1--20. http://www.jstatsoft.org/v39/i09/.

See Also

The class definition, "acopula". getAcop accesses these families programmatically.

Examples

Run this code
## Print a copAMH object and its structure
copAMH
str(copAMH)

## Show admissible parameters for a Clayton copula
copClayton@paraInterval

## Generate random variates from a Log(p) distribution via V0 of Frank
p <- 1/2
copFrank@V0(100, -log(1-p))

## Plot the upper tail-dependence coefficient as a function in the
## parameter for Gumbel's family
curve(copGumbel@lambdaU(x), xlim = c(1, 10), ylim = c(0,1), col = 4)

## Plot Kendall's tau as a function in the parameter for Joe's family
curve(copJoe@tau(x), xlim = c(1, 10), ylim = c(0,1), col = 4)

## ------- Plot psi() and tau() - and properties of all families ----

## The copula families currently provided:
(famNms <- ls("package:copula", patt="^cop[A-Z]"))

op <- par(mfrow= c(length(famNms), 2),
          mar = .6+ c(2,1.4,1,1), mgp = c(1.1, 0.4, 0))
for(nm in famNms) { Cf <- get(nm)
   thet <- Cf@tauInv(0.3)
   curve(Cf@psi(x, theta = thet), 0, 5,
         xlab = expression(x), ylab="", ylim=0:1, col = 2,
         main = substitute(list(NAM ~~~ psi(x, theta == TH), tau == 0.3),
                           list(NAM=Cf@name, TH=thet)))
   I <- Cf@paraInterval
   Iu <- pmin(10, I[2])
   curve(Cf@tau(x), I[1], Iu, col = 3,
         xlab = bquote(theta %in% .(format(I))), ylab = "",
         main = substitute(NAM ~~ tau(theta), list(NAM=Cf@name)))
}
par(op)

## Construct a bivariate Clayton copula with parameter theta
theta <- 2
C2 <- onacopula("Clayton", C(theta, 1:2))
C2@copula # is an "acopula" with specific parameter theta

curve(C2@copula@psi(x, C2@copula@theta),
      main = quote("Generator" ~~ psi ~~ "of Clayton A.copula"),
      xlab = quote(theta1), ylab = quote(psi(theta1)),
      xlim = c(0,5), ylim = c(0,1), col = 4)

## What is the corresponding Kendall's tau?
C2@copula@tau(theta) # 0.5

## What are the corresponding tail-dependence coefficients?
C2@copula@lambdaL(theta)
C2@copula@lambdaU(theta)

## Generate n pairs of random variates from this copula
U <- rnacopula(n = 1000, C2)
## and plot the generated pairs of random variates
plot(U, asp=1, main = "n = 1000 from  Clayton(theta = 2)")

Run the code above in your browser using DataLab