Expected hessian of a parametric S-vine models

svine_hessian(x, model, cores = 1)

Arguments

x

the data.

model

S-vine model (inheriting from svine_dist).

cores

number of cores to use.

Value

A returns a k-by-k matrix, where k is the total number of parameters in the model. Parameters are ordered as follows: marginal parameters, copula parameters of first tree, copula parameters of second tree, etc. Duplicated parameters in the copula model are omitted.

Examples

data(returns)
dat <- returns[1:100, 1:2]

# fit parametric S-vine model with Markov order 1
model <- svine(dat, p = 1, family_set = "parametric")

# Implementation of asymptotic variances
I <- cov(svine_scores(dat, model))
H <- svine_hessian(dat, model)
Hi <- solve(H)
Hi %*% I %*% t(Hi) / nrow(dat)
#>                [,1]          [,2]          [,3]          [,4]          [,5]
#>  [1,]  1.646796e-06 -7.272346e-08  1.251305e-06 -1.910311e-07 -1.168358e-05
#>  [2,] -7.272346e-08  2.742702e-07 -9.648874e-08  1.579411e-07  1.498636e-06
#>  [3,]  1.251305e-06 -9.648874e-08  2.312842e-06 -2.382406e-07  2.483107e-05
#>  [4,] -1.910311e-07  1.579411e-07 -2.382406e-07  3.800397e-07 -6.936534e-06
#>  [5,] -1.168358e-05  1.498636e-06  2.483107e-05 -6.936534e-06  2.901260e-03
#>  [6,]  7.321560e-05  1.461359e-04  2.460298e-04  1.070328e-04  2.775175e-02
#>  [7,]  2.201479e-05  3.191181e-08  2.451189e-06 -4.426845e-08  5.152500e-04
#>  [8,] -5.200381e-04  2.666284e-04 -5.876481e-04 -4.609263e-06 -1.562355e-02
#>  [9,]  2.009948e-05  6.246524e-07  1.157621e-05  1.257099e-05 -1.267362e-03
#>                [,6]          [,7]          [,8]          [,9]
#>  [1,]  0.0000732156  2.201479e-05 -5.200381e-04  2.009948e-05
#>  [2,]  0.0001461359  3.191181e-08  2.666284e-04  6.246524e-07
#>  [3,]  0.0002460298  2.451189e-06 -5.876481e-04  1.157621e-05
#>  [4,]  0.0001070328 -4.426845e-08 -4.609263e-06  1.257099e-05
#>  [5,]  0.0277517462  5.152500e-04 -1.562355e-02 -1.267362e-03
#>  [6,]  2.4984113779  2.507666e-02 -5.657979e-02  1.999937e-02
#>  [7,]  0.0250766551  1.281737e-02 -1.078909e-01  8.848302e-04
#>  [8,] -0.0565797906 -1.078909e-01  6.793559e+00 -1.017606e-02
#>  [9,]  0.0199993676  8.848302e-04 -1.017606e-02  9.022121e-03