Learn R Programming

VineCopula (version 1.6-1)

RVineStructureSelect: Sequential Specification of R- and C-Vine Copula Models

Description

This function fits either an R- or a C-vine copula model to a d-dimensional copula data set. Tree structures are determined and appropriate pair-copula families are selected using BiCopSelect and estimated sequentially (forward selection of trees).

Usage

RVineStructureSelect(data, familyset = NA, type = 0, selectioncrit = "AIC",
                     indeptest = FALSE, level = 0.05, trunclevel = NA,
                     progress = FALSE, weights = NA, rotations = TRUE)

Arguments

data
An N x d data matrix (with uniform margins).
familyset
An integer vector of pair-copula families to select from (the independence copula MUST NOT be specified in this vector unless one wants to fit an independence vine!). The vector has to include at least one pair-copula family that allows for positive
type
Type of the vine model to be specified: 0 or "RVine" = R-vine (default) 1 or "CVine" = C-vine C- and D-vine copula models with pre-specified order can be specified using CDVineCopSelect of t
selectioncrit
Character indicating the criterion for pair-copula selection. Possible choices: selectioncrit = "AIC" (default) or "BIC" (see BiCopSelect).
indeptest
Logical; whether a hypothesis test for the independence of u1 and u2 is performed before bivariate copula selection (default: indeptest = FALSE; see BiCopIndTest
level
Numerical; significance level of the independence test (default: level = 0.05).
trunclevel
Integer; level of truncation.
progress
Logical; whether the tree-wise specification progress is printed (default: progress = FALSE).
weights
Numerical; weights for each observation (opitional).
rotations
If TRUE, all rotations of the families in familyset are included.

Value

  • An RVineMatrix object with the selected structure (RVM$Matrix) and families (RVM$family) as well as sequentially estimated parameters stored in RVM$par and RVM$par2.

Details

R-vine trees are selected using maximum spanning trees with absolute values of pairwise Kendall's taus as weights, i.e., the following optimization problem is solved for each tree: $$\max \sum_{edges\ e_{ij}\ in\ spanning\ tree} |\hat{\tau}_{ij}|,$$ where $\hat{\tau}_{ij}$ denote the pairwise empirical Kendall's taus and a spanning tree is a tree on all nodes. The setting of the first tree selection step is always a complete graph. For subsequent trees, the setting depends on the R-vine construction principles, in particular on the proximity condition. The root nodes of C-vine trees are determined similarly by identifying the node with strongest dependencies to all other nodes. That is we take the node with maximum column sum in the empirical Kendall's tau matrix. Note that a possible way to determine the order of the nodes in the D-vine is to identify a shortest Hamiltonian path in terms of weights $1-|\tau_{ij}|$. This can be established for example using the package TSP. Example code is shown below.

References

Brechmann, E. C., C. Czado, and K. Aas (2012). Truncated regular vines in high dimensions with applications to financial data. Canadian Journal of Statistics 40 (1), 68-85. Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimating regular vine copulae and application to financial returns. Computational Statistics & Data Analysis, 59 (1), 52-69.

See Also

RVineTreePlot, RVineCopSelect

Examples

Run this code
# load data set
data(daxreturns)

# select the R-vine structure, families and parameters
# using only the first 4 variables and the first 750 observations
# we allow for the copula families: Gauss, t, Clayton, Gumbel, Frank and Joe
RVM <- RVineStructureSelect(daxreturns[1:750,1:4], c(1:6), progress = TRUE)

# specify a C-vine copula model with only Clayton, Gumbel and Frank copulas (time-consuming)
CVM <- RVineStructureSelect(daxreturns, c(3,4,5), "CVine")

# determine the order of the nodes in a D-vine using the package TSP (time-consuming)
library(TSP)
d <- dim(daxreturns)[2]
M <- 1 - abs(TauMatrix(daxreturns))
hamilton <- insert_dummy(TSP(M), label = "cut")
sol <- solve_TSP(hamilton, method = "repetitive_nn")
order <- cut_tour(sol, "cut")
DVM <- D2RVine(order, family = rep(0,d*(d-1)/2), par = rep(0, d*(d-1)/2))
RVineCopSelect(daxreturns, c(1:6), DVM$Matrix)

Run the code above in your browser using DataLab