Automated fitting or creation of custom S-vine copula models
svinecop(
data,
p,
var_types = rep("c", NCOL(data)),
family_set = "all",
cs_structure = NA,
out_vertices = NA,
in_vertices = NA,
type = "S",
par_method = "mle",
nonpar_method = "constant",
mult = 1,
selcrit = "aic",
weights = numeric(),
psi0 = 0.9,
presel = TRUE,
trunc_lvl = Inf,
tree_crit = "tau",
threshold = 0,
keep_data = FALSE,
show_trace = FALSE,
cores = 1
)Returns the fitted model as an object with classes
svinecop and svinecop_dist. Also inherits from vinecop, vinecop_dist
such that many functions from rvinecopulib can be called.
a matrix or data.frame (copula data should have approximately uniform margins).
the Markov order.
variable types; discrete variables not (yet) allowed.
a character vector of families; see rvinecopulib::bicop()
for additional options.
the cross-sectional vine structure (see
rvinecopulib::rvine_structure(); cs_structure = NA performs automatic
structure selection.
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.
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.
type of stationary vine; "S" (default) for general S-vines,
"D" for Smith's long D-vine, "M" for Beare and Seo's M-vine.
the estimation method for parametric models, either "mle"
for sequential maximum likelihood, "itau" for inversion of Kendall's tau
(only available for one-parameter families and "t".
the estimation method for nonparametric models, either
"constant" for the standard transformation estimator, or
"linear"/"quadratic" for the local-likelihood approximations of order
one/two.
multiplier for the smoothing parameters of nonparametric families. Values larger than 1 make the estimate more smooth, values less than 1 less smooth.
criterion for family selection, either "loglik", "aic",
"bic", "mbic". For vinecop() there is the additional option
"mbicv".
optional vector of weights for each observation.
prior probability of a non-independence copula (only used for
selcrit = "mbic" and selcrit = "mbicv").
whether the family set should be thinned out according to symmetry characteristics of the data.
currently unsupported.
the criterion for tree selection, one of "tau", "rho",
"hoeffd", or "mcor" for Kendall's \(\tau\), Spearman's \(\rho\),
Hoeffding's \(D\), and maximum correlation, respectively.
for thresholded vine copulas; NA indicates that the
threshold should be selected automatically by rvinecopulib::mBICV().
whether the data should be stored (necessary for using
fitted()).
logical; whether a trace of the fitting progress should be printed.
number of cores to use; if more than 1, estimation of pair copulas within a tree is done in parallel.
# load data set
data(returns)
# convert to pseudo observations with empirical cdf for marginal distributions
u <- pseudo_obs(returns[1:100, 1:3])
# fit parametric S-vine copula model with Markov order 1
fit <- svinecop(u, p = 1, family_set = "parametric")
fit
summary(fit)
plot(fit)
contour(fit)
logLik(fit)
pairs(svinecop_sim(500, rep = 1, fit))
Run the code above in your browser using DataLab