Learn R Programming

VineCopula (version 2.6.0)

RVineSeqEst: Sequential Estimation of an R-Vine Copula Model

Description

This function sequentially estimates the pair-copula parameters of a d-dimensional R-vine copula model as specified by the corresponding RVineMatrix() object.

Usage

RVineSeqEst(
  data,
  RVM,
  method = "mle",
  se = FALSE,
  max.df = 30,
  max.BB = list(BB1 = c(5, 6), BB6 = c(6, 6), BB7 = c(5, 6), BB8 = c(6, 1)),
  progress = FALSE,
  weights = NA,
  cores = 1
)

Value

An RVineMatrix() object with the sequentially estimated parameters stored in RVM$par and RVM$par2. The object is augmented by the following information about the fit:

se, se2

standard errors for the parameter estimates (if se = TRUE); note that these are only approximate since they do not account for the sequential nature of the estimation,

nobs

number of observations,

logLik, pair.logLik

log likelihood (overall and pairwise)

AIC, pair.AIC

Aikaike's Informaton Criterion (overall and pairwise),

BIC, pair.BIC

Bayesian's Informaton Criterion (overall and pairwise),

emptau

matrix of empirical values of Kendall's tau,

p.value.indeptest

matrix of p-values of the independence test.

Arguments

data

An N x d data matrix (with uniform margins).

RVM

An RVineMatrix() object including the structure, the pair-copula families and the pair-copula parameters (if they are known).

method

indicates the estimation method: either maximum likelihood estimation (method = "mle"; default) or inversion of Kendall's tau (method = "itau"). For method = "itau" only one parameter families and the Student t copula can be used (family = 1,2,3,4,5,6,13,14,16,23,24,26,33,34 or 36). For the t-copula, par2 is found by a crude profile likelihood optimization over the interval (2, 10].

se

Logical; whether standard errors are estimated (default: se = FALSE).

max.df

Numeric; upper bound for the estimation of the degrees of freedom parameter of the t-copula (default: max.df = 30; for more details see BiCopEst()).

max.BB

List; upper bounds for the estimation of the two parameters (in absolute values) of the BB1, BB6, BB7 and BB8 copulas
(default: max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1))).

progress

Logical; whether the pairwise estimation progress is printed (default: progress = FALSE).

weights

Numerical; weights for each observation (optional).

cores

integer; if cores > 1, estimation will be parallelized within each tree (using parallel::parLapply()). However, the overhead caused by parallelization is likely to make the function run slower unless sample size is really large and method = "itau".

Author

Ulf Schepsmeier, Jeffrey Dissmann, Thomas Nagler

Details

The pair-copula parameter estimation is performed tree-wise, i.e., for each R-vine tree the results from the previous tree(s) are used to calculate the new copula parameters using BiCopEst().

See Also

RVineMatrix(), BiCop(), BiCopEst(), plot.RVineMatrix(), contour.RVineMatrix()

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 300 from the R-vine copula model
set.seed(123)
simdata <- RVineSim(300, RVM)

# sequential estimation
summary(RVineSeqEst(simdata, RVM, method = "itau", se = TRUE))
summary(RVineSeqEst(simdata, RVM, method = "mle", se = TRUE))

Run the code above in your browser using DataLab