vinecopulib::FitControlsBicop class

A class for controlling fits of bivariate copula models.

Derived classes

class FitControlsVinecop
A class for controlling fits of vine copula models.

Constructors, destructors, conversion operators

FitControlsBicop(std::vector<BicopFamily> family_set = bicop_families::all, std::string parametric_method = "mle", std::string nonparametric_method = "constant", double nonparametric_mult = 1.0, size_t nonparametric_grid_size = 30, std::string selection_criterion = "aic", const Eigen::VectorXd& weights = Eigen::VectorXd(), double psi0 = 0.9, bool preselect_families = true, bool allow_rotations = true, size_t num_threads = 1)
Instantiates the controls for fitting bivariate copula models.
FitControlsBicop(std::string parametric_method) explicit
Instantiates default controls except for the parameteric method.
FitControlsBicop(std::string nonparametric_method, double nonparametric_mult = 1.0, size_t nonparametric_grid_size = 30) explicit
Instantiates default controls except for the nonparametric method.
FitControlsBicop(const FitControlsConfig& config) explicit
Instantiates the controls from a configuration object.

Public functions

auto str() const -> std::string
Summarizes the controls into a string (can be used for printing).

Getters and setters.

auto get_family_set() const -> std::vector<BicopFamily>
Gets the family set.
auto get_parametric_method() const -> std::string
Gets the parametric method.
auto get_nonparametric_method() const -> std::string
Gets the nonparametric method.
auto get_nonparametric_mult() const -> double
Gets the nonparametric bandwidth multiplier.
auto get_nonparametric_grid_size() const -> size_t
Gets the nonparametric grid size.
auto get_selection_criterion() const -> std::string
auto get_weights() const -> Eigen::VectorXd
Gets the observation weights.
auto get_preselect_families() const -> bool
Gets whether to preselect families.
auto get_psi0() const -> double
Gets the baseline probability for mBIC selection.
auto get_num_threads() const -> size_t
Gets the number of threads.
auto get_allow_rotations() const -> bool
Gets whether to allow rotations.
auto set_family_set(std::vector<BicopFamily> family_set) -> void
Sets the family set.
auto set_parametric_method(std::string parametric_method) -> void
Sets the parametric method.
auto set_nonparametric_method(std::string nonparametric_method) -> void
Sets the nonparmetric method.
auto set_nonparametric_mult(double nonparametric_mult) -> void
Sets the nonparametric multiplier.
auto set_nonparametric_grid_size(size_t nonparametric_grid_size) -> void
Sets the nonparametric grid size.
auto set_selection_criterion(std::string selection_criterion) -> void
Sets the selection criterion.
auto set_weights(const Eigen::VectorXd& weights) -> void
Sets the observation weights.
auto set_preselect_families(bool preselect_families) -> void
Sets whether to preselect the families.
auto set_psi0(double psi0) -> void
Sets the prior probability for mBIC.
auto set_num_threads(size_t num_threads) -> void
Sets the number of threads.
auto set_allow_rotations(bool allow_rotations) -> void
Sets whether to allow rotations.

Function documentation

vinecopulib::FitControlsBicop::FitControlsBicop(std::vector<BicopFamily> family_set = bicop_families::all, std::string parametric_method = "mle", std::string nonparametric_method = "constant", double nonparametric_mult = 1.0, size_t nonparametric_grid_size = 30, std::string selection_criterion = "aic", const Eigen::VectorXd& weights = Eigen::VectorXd(), double psi0 = 0.9, bool preselect_families = true, bool allow_rotations = true, size_t num_threads = 1)

Instantiates the controls for fitting bivariate copula models.

Parameters
family_set The set of copula families to consider (if empty, then all families are included).
parametric_method The fit method for parametric families; possible choices: "mle", "itau".
nonparametric_method The fit method for the local-likelihood nonparametric family (TLLs); possible choices: "constant", "linear", "quadratic".
nonparametric_mult A factor with which the smoothing parameters are multiplied (default: 1.0).
nonparametric_grid_size The grid size for the post-estimation interpolation in nonparametric models (default: 30).
selection_criterion The selection criterion ("loglik", "aic", "bic", "mbic", or "mbicv") for the pair copula families.
weights A vector of weights for the observations.
psi0 Only for selection_criterion = "mbic", the prior probability of non-independence.
preselect_families Whether to exclude families before fitting based on symmetry properties of the data.
allow_rotations Allow rotations for the families when doing model selection (default: true).
num_threads Number of concurrent threads to use while fitting copulas for different families; never uses more than the number of concurrent threads supported by the implementation.

vinecopulib::FitControlsBicop::FitControlsBicop(std::string parametric_method) explicit

Instantiates default controls except for the parameteric method.

Parameters
parametric_method The fit method for parametric families; possible choices: "mle", "itau".

vinecopulib::FitControlsBicop::FitControlsBicop(std::string nonparametric_method, double nonparametric_mult = 1.0, size_t nonparametric_grid_size = 30) explicit

Instantiates default controls except for the nonparametric method.

Parameters
nonparametric_method The fit method for the local-likelihood nonparametric family (TLLs); possible choices: "constant", "linear", "quadratic".
nonparametric_mult A factor with which the smoothing parameters are multiplied (default: 1.0).
nonparametric_grid_size The grid size for the post-estimation interpolation in nonparametric models (default: 30).

vinecopulib::FitControlsBicop::FitControlsBicop(const FitControlsConfig& config) explicit

Instantiates the controls from a configuration object.

Parameters
config The configuration object.

std::vector<BicopFamily> vinecopulib::FitControlsBicop::get_family_set() const

Gets the family set.

Returns the set of pair-copula families considered during selection.

std::string vinecopulib::FitControlsBicop::get_parametric_method() const

Gets the parametric method.

Returns the parametric estimator used for parametric families (one of "mle", "itau").

std::string vinecopulib::FitControlsBicop::get_nonparametric_method() const

Gets the nonparametric method.

Returns the nonparametric estimator used for the tll family (one of "constant", "linear", "quadratic").

double vinecopulib::FitControlsBicop::get_nonparametric_mult() const

Gets the nonparametric bandwidth multiplier.

Returns the bandwidth multiplier applied during nonparametric fits.

size_t vinecopulib::FitControlsBicop::get_nonparametric_grid_size() const

Gets the nonparametric grid size.

Returns the grid size used during nonparametric fits (number of grid points per axis).

std::string vinecopulib::FitControlsBicop::get_selection_criterion() const

Returns the model-selection criterion (one of "loglik", "aic", "bic", "mbic").

Eigen::VectorXd vinecopulib::FitControlsBicop::get_weights() const

Gets the observation weights.

Returns the per-observation weights used during fitting (empty when observations are weighted equally).

bool vinecopulib::FitControlsBicop::get_preselect_families() const

Gets whether to preselect families.

Returns whether families are pre-screened by a quick fit before the full criterion comparison.

double vinecopulib::FitControlsBicop::get_psi0() const

Gets the baseline probability for mBIC selection.

Returns the prior probability of a non-independence copula used by the mbic criterion.

size_t vinecopulib::FitControlsBicop::get_num_threads() const

Gets the number of threads.

Returns the number of threads used during fitting.

bool vinecopulib::FitControlsBicop::get_allow_rotations() const

Gets whether to allow rotations.

Returns whether non-zero copula rotations are considered during family selection.