Learn R Programming

VineCopula (version 1.6-1)

RVineCopSelect: Sequential Pair-Copula Selection and Estimation for R-Vine Copula Models

Description

This function fits a R-vine copula model to a d-dimensional copula data set. Pair-copula families are selected using BiCopSelect and estimated sequentially.

Usage

RVineCopSelect(data, familyset = NA, Matrix, selectioncrit = "AIC", indeptest = FALSE,
               level = 0.05, trunclevel = 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
Matrix
Lower or upper triangular d x d matrix that defines the R-vine tree structure.
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
Numeric; significance level of the independence test (default: level = 0.05).
trunclevel
Integer; level of truncation.
rotations
If TRUE, all rotations of the families in familyset are included.

Value

  • An RVineMatrix object with the following matrix components
  • MatrixR-vine tree structure matrix as given by the argument Matrix.
  • familySelected pair-copula family matrix with values corresponding to 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) 104 = Tawn type 1 copula 114 = rotated Tawn type 1 copula (180 degrees) 124 = rotated Tawn type 1 copula (90 degrees) 134 = rotated Tawn type 1 copula (270 degrees) 204 = Tawn type 2 copula 214 = rotated Tawn type 2 copula (180 degrees) 224 = rotated Tawn type 2 copula (90 degrees) 234 = rotated Tawn type 2 copula (270 degrees)
  • parEstimated pair-copula parameter matrix.
  • par2Estimated second pair-copula parameter matrix with parameters of pair-copula families with two parameters.

Details

R-vine copula models with unknown structure can be specified using RVineStructureSelect.

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

RVineStructureSelect, BiCopSelect, RVineSeqEst

Examples

Run this code
# define 5-dimensional R-vine tree structure matrix
Matrix <- c(5, 2, 3, 1, 4,
            0, 2, 3, 4, 1,
            0, 0, 3, 4, 1,
            0, 0, 0, 4, 1,
            0, 0, 0, 0, 1)
Matrix <- matrix(Matrix, 5, 5)

# define R-vine pair-copula family matrix
family <- c(0, 1, 3, 4, 4,
            0, 0, 3, 4, 1,
            0, 0, 0, 4, 1,
            0, 0, 0, 0, 3,
            0, 0, 0, 0, 0)
family <- matrix(family, 5, 5)

# define R-vine pair-copula parameter matrix
par <- c(0, 0.2, 0.9, 1.5, 3.9,
         0, 0, 1.1, 1.6, 0.9,
         0, 0, 0, 1.9, 0.5,
         0, 0, 0, 0, 4.8,
         0, 0, 0, 0, 0)
par <- matrix(par, 5, 5)

# define second R-vine pair-copula parameter matrix
par2 <- matrix(0, 5, 5)

# define RVineMatrix object
RVM <- RVineMatrix(Matrix = Matrix, family = family,
                   par = par, par2 = par2,
                   names = c("V1", "V2", "V3", "V4", "V5"))
                  
# simulate a sample of size 1000 from the R-vine copula model
set.seed(123)
simdata <- RVineSim(1000, RVM)

# determine the pair-copula families and parameters
RVM1 <- RVineCopSelect(simdata, familyset = c(1, 3, 4, 5 ,6), Matrix)

Run the code above in your browser using DataLab