svine_dist {svines}R Documentation

Custom S-vine distribution models

Description

Custom S-vine distribution models

Usage

svine_dist(margins, copula)

Arguments

margins

A list of length d containing univariateML objects.

copula

the copula model; an object of class svinecop_dist with cross-sectional dimension d.

Value

Returns the model as an object with class svine_dist. A list with entries

See Also

svine_dist, svine_loglik, svine_sim, svine_bootstrap_models

Examples

## marginal objects
# create dummy univariateML models
univ1 <- univ2 <- univariateML::mlnorm(rnorm(10))

# modify the parameters to N(5, 10) and N(0, 2) distributions
univ1[] <- c(5, 10)
univ2[] <- c(0, 2)

## copula óbject
cs_struct <- cvine_structure(1:2)
pcs <- list(
  list(  # first tree
    bicop_dist("clayton", 0, 3), # cross sectional copula
    bicop_dist("gaussian", 0, -0.1)  # serial copula
  ),
  list(  # second tree
    bicop_dist("gaussian", 0, 0.2), bicop_dist("indep")  
  ),
  list( # third tree
    bicop_dist("indep")
  )
)

cop <- svinecop_dist(
  pcs, cs_struct, p = 1, out_vertices = 1:2, in_vertices = 1:2)
    
model <- svine_dist(margins = list(univ1, univ2), copula = cop)
summary(model)


[Package svines version 0.2.3 Index]