Learn R Programming

VineCopula (version 1.6-1)

RVineHessian: Hessian Matrix of the Log-Likelihood of an R-Vine Copula Model

Description

This function calculates the Hessian matrix of the log-likelihood of a d-dimensional R-vine copula model with respect to the copula parameter and evaluates it on a given copula data set.

Usage

RVineHessian(data, RVM)

Arguments

data
An N x d data matrix (with uniform margins).
RVM
An RVineMatrix object including the structure, the pair-copula families, and the parameters. Only the following copula families are allowed in RVM$family 0 = independence cop

Value

  • hessianThe calculated Hessian matrix of the log-likelihood value of the R-vine copula model.
  • derThe product of the gradient vector with its transposed version.

References

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. Schepsmeier, U. and J. Stoeber (2012). Derivatives and Fisher information of bivariate copulas. Statistical Papers. http://link.springer.com/article/10.1007/s00362-013-0498-x. Stoeber, J. and U. Schepsmeier (2013). Estimating standard errors in regular vine copula models. Computational Statistics, 1-29 http://link.springer.com/article/10.1007/s00180-013-0423-8#.

See Also

BiCopDeriv, BiCopDeriv2, BiCopHfuncDeriv, BiCopHfuncDeriv2, RVineMatrix, RVineMLE, RVineGrad

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)

# compute the Hessian matrix of the first row of the data
out2 <- RVineHessian(simdata[1,], RVM)
out2$hessian

Run the code above in your browser using DataLab