Learn R Programming

VineCopula (version 1.6-1)

D2RVine: Transform D-Vine to R-Vine Structure

Description

This function transforms a D-vine structure from the package CDVine to the corresponding R-vine structure.

Usage

D2RVine(order, family, par, par2 = rep(0, length(family)))

Arguments

order
A d-dimensional vector specifying the order of the nodes in the D-vine.
family
A d*(d-1)/2 vector of pair-copula families with values 0 = independence copula 1 = Gaussian copula 2 = Student t copula (t-copula) 3 = Clayton copula 4 = Gumbel copula 5 =
par
A d*(d-1)/2 vector of pair-copula parameters.
par2
A d*(d-1)/2 vector of second pair-copula parameters (optional; default: par2 = rep(0,length(family))), necessary for the t-, BB1, BB6, BB7, BB8, Tawn type 1 and type 2 copulas.

Value

See Also

RVineMatrix, C2RVine

Examples

Run this code
# set up 4-dimensional D-vine in R-Vine notation
d <- 4
dd <- d * (d-1) / 2
order <- 1:d
family <- c(1, 2, 3, 4, 7, 3)
par <- c(0.5, 0.4, 2, 1.5, 1.2, 1.5)
par2 <- c(0, 5, 0, 0, 2, 0)
RVM <- D2RVine(order, family, par, par2)

# simulate from C-vine model
simdata <- RVineSim(500, RVM)

# calculate likelihood
out2 <- RVineLogLik(simdata, RVM)
out2$loglik

Run the code above in your browser using DataLab