svine_scores: Score function of parametric S-vine models

View source: R/standard_errors.R

svine_scoresR Documentation

Score function of parametric S-vine models

Description

Score function of parametric S-vine models

Usage

svine_scores(x, model, cores = 1)

Arguments

x

the data.

model

S-vine model (inheriting from svine_dist).

cores

number of cores to use.

Value

An n-by-k matrix, where n = NROW(x) - model$copula$p and k is the total number of model parameters. The rows correspond to the effective time points after the first p observations. 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)
n_eff <- nrow(dat) - model$copula$p
Hi %*% I %*% t(Hi) / n_eff

svines documentation built on Sept. 1, 2026, 1:08 a.m.