Learn R Programming

CDVine (version 1.4)

BiCopHfunc: Conditional distribution function (h-function) of a bivariate copula

Description

This function evaluates the conditional distribution function (h-function) of a given parametric bivariate copula.

Usage

BiCopHfunc(u1, u2, family, par, par2=0)

Arguments

u1,u2
Numeric vectors of equal length with values in [0,1].
family
An integer defining the bivariate copula family: 0 = independence copula 1 = Gaussian copula 2 = Student t copula (t-copula) 3 = Clayton copula 4 = Gumbel copula 5 = Frank copula 6 = Joe copula 7 = BB1 copula 8 = BB6 copula 9 = BB7 copula 10 = BB8 copula 13 = rotated Clayton copula (180 degrees; ``survival Clayton'') 14 = rotated Gumbel copula (180 degrees; ``survival Gumbel'') 16 = rotated Joe copula (180 degrees; ``survival Joe'') 17 = rotated BB1 copula (180 degrees; ``survival BB1'') 18 = rotated BB6 copula (180 degrees; ``survival BB6'') 19 = rotated BB7 copula (180 degrees; ``survival BB7'') 20 = rotated BB8 copula (180 degrees; ``survival BB8'') 23 = rotated Clayton copula (90 degrees) 24 = rotated Gumbel copula (90 degrees) 26 = rotated Joe copula (90 degrees) 27 = rotated BB1 copula (90 degrees) 28 = rotated BB6 copula (90 degrees) 29 = rotated BB7 copula (90 degrees) 30 = rotated BB8 copula (90 degrees) 33 = rotated Clayton copula (270 degrees) 34 = rotated Gumbel copula (270 degrees) 36 = rotated Joe copula (270 degrees) 37 = rotated BB1 copula (270 degrees) 38 = rotated BB6 copula (270 degrees) 39 = rotated BB7 copula (270 degrees) 40 = rotated BB8 copula (270 degrees)
par
Copula parameter.
par2
Second parameter for bivariate copulas with two parameters (t, BB1, BB6, BB7, BB8; default: par2 = 0).

Value

hfunc1
Numeric vector of the conditional distribution function (h-function) evaluated at u2 given u1, i.e., $h(u2|u1,\theta)$.
hfunc2
Numeric vector of the conditional distribution function (h-function) evaluated at u1 given u2, i.e., $h(u1|u2,\theta)$.

Details

The h-function is defined as the conditional distribution function of a bivariate copula, i.e., $$ h(u|v,\boldsymbol{\theta}) := F(u|v) = \frac{\partial C(u,v)}{\partial v}, $$ where $C$ is a bivariate copula distribution function with parameter(s) $\theta$. For more details see Aas et al. (2009).

References

Aas, K., C. Czado, A. Frigessi, and H. Bakken (2009). Pair-copula constructions of multiple dependence. Insurance: Mathematics and Economics 44 (2), 182-198.

See Also

BiCopPDF, BiCopCDF, CDVineLogLik, CDVineSeqEst

Examples

Run this code
## Example 1: 4-dimensional C-vine model with mixed pair-copulas
data(worldindices)
Data = as.matrix(worldindices)[,1:4]
d = dim(Data)[2]
fam = c(5,1,3,14,3,2)

# sequential estimation
seqpar1 = CDVineSeqEst(Data,fam,type=1,method="itau")

# calculate the inputs of the second tree using h-functions
h1 = BiCopHfunc(Data[,1],Data[,2],fam[1],seqpar1$par[1])
h2 = BiCopHfunc(Data[,1],Data[,3],fam[2],seqpar1$par[2])
h3 = BiCopHfunc(Data[,1],Data[,4],fam[3],seqpar1$par[3])

# compare estimated parameters
BiCopEst(h1$hfunc1,h2$hfunc1,fam[4],method="itau")
seqpar1$par[4]

BiCopEst(h1$hfunc1,h3$hfunc1,fam[5],method="itau")
seqpar1$par[5]


## Example 2: 4-dimensional D-vine model with mixed pair-copulas

# sequential estimation
seqpar2 = CDVineSeqEst(Data,fam,type=2,method="itau")

# calculate the inputs of the second tree using h-functions
h1 = BiCopHfunc(Data[,1],Data[,2],fam[1],seqpar2$par[1])
h2 = BiCopHfunc(Data[,2],Data[,3],fam[2],seqpar2$par[2])
h3 = BiCopHfunc(Data[,3],Data[,4],fam[3],seqpar2$par[3])

# compare estimated parameters
BiCopEst(h1$hfunc2,h2$hfunc1,fam[4],method="itau")
seqpar2$par[4]

BiCopEst(h2$hfunc2,h3$hfunc1,fam[5],method="itau")
seqpar2$par[5]

Run the code above in your browser using DataLab