Custom S-vine models
Arguments
- pair_copulas
A nested list of 'bicop_dist' objects, where
pair_copulas[[t]][[e]]
corresponds to the pair-copula at edgee
in treet
. Only the most-left unique pair copulas are used, others can be omitted.- cs_structure
The cross-sectional structure. Either a matrix, or an
rvine_structure
object; seervinecopulib::rvine_structure()
- p
the Markov order.
- out_vertices
the out-vertex; if
NA
, the out-vertex is selected automatically if no structure is provided, and is equivalent to 1 if a structure is provided.- in_vertices
the in-vertex; if
NA
, the in-vertex is selected automatically if no structure is provided, and is equivalent to 1 if a structure is provided.- var_types
variable types; discrete variables not (yet) allowed.
Value
Returns the model as an object with classes
svinecop_dist
. Also inherits from vinecop_dist
such that many functions from rvinecopulib
can be called.
Examples
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)