mixtureCopula: Constructor of a mixture copula

Description Usage Arguments Value Author(s) Examples

Description

An instance of a convex mixture of two copulas is generated.

Usage

1
mixtureCopula(param = c(0.2, 0.2, 0.5), memberCops = c(normalCopula(0), claytonCopula(1)))

Arguments

param

A numeric vector: the set of parameters for the first and second copula appended by the mixture coefficient.

memberCops

A list of two copulas.

Value

An object of class mixtureCopula

Author(s)

Benedikt Graeler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
cop <- mixtureCopula(c(5,-0.8,0.5),
                     memberCops = list(gumbelCopula(), claytonCopula()))
cop

smpl <- rCopula(100, cop)

par(mfrow=c(2,2), mai=c(0.4,0.4,0.4,0.4))
plot(smpl,asp=1, main="sample")
persp(cop, dCopula, asp=1, main="density")

contour(cop, pCopula, asp=1, main="CDF")
points(rCopula_y(0.4, cop, 10), col="red")

tau(cop)
rho(cop)
lambda(cop)

# too few points, but faster for package compilation
kenCop <- getKendallDistr(cop, smpl)
curve(kenCop, main="Kendall function", asp=1)

BenGraeler/spcopula documentation built on Nov. 20, 2020, 4:07 p.m.