vinecopulib namespace
Tools for bivariate and vine copula modeling.
Namespaces
- namespace bicop_families
- Convenience definitions of sets of bivariate copula families.
- namespace tools_select
- namespace tools_stats
- Utilities for statistical analysis.
Classes
- class Bicop
- A class for bivariate copula models.
- class CVineStructure
- A class for C-vine structures.
- class DVineStructure
- A class for D-vine structures.
- class FitControlsBicop
- A class for controlling fits of bivariate copula models.
- struct FitControlsConfig
- class FitControlsVinecop
- A class for controlling fits of vine copula models.
- class RVineStructure
- A class for R-vine structures.
- class RVineTrees
- A list-of-trees decomposition of an R-vine structure.
- class TriangularArray
- Triangular arrays.
- class Vinecop
- A class for vine copula models.
Enums
Typedefs
- using TreeCriterionFunction = std::function<double(const Eigen::MatrixXd&, const Eigen::VectorXd&)>
- A custom edge-weight function for vine structure selection.
Functions
- auto get_family_name(BicopFamily family) -> std::string
- Converts a BicopFamily into a string with its name.
- auto get_family_enum(const std::string& family) -> BicopFamily
- Converts a string name into a BicopFamily.
- auto assemble_scores(Eigen::Index n, Eigen::Index p, const std::function<Eigen::VectorXd(Eigen::Index)>& col) -> Eigen::MatrixXd
- Assembles an score matrix from a per-parameter column evaluator (
col(k)returns columnk). Shared by the fixed- and per-row-parameterscores()overloads so each keeps its own optimallogpdf_deriv()path (broadcast vs. per-row) while the loop lives once. - auto assemble_hessian(Eigen::Index p, const std::function<Eigen::VectorXd(Eigen::Index, Eigen::Index)>& col) -> Eigen::MatrixXd
- Assembles the averaged, symmetric Hessian from a per- second-derivative column evaluator (upper triangle only).
- auto assemble_hessian_full(Eigen::Index n, Eigen::Index p, const std::function<Eigen::VectorXd(Eigen::Index, Eigen::Index)>& col) -> std::vector<Eigen::MatrixXd>
- Assembles the per-observation, symmetric Hessians (one per row of
u) from the same per- column evaluator. -
template<typename T>auto operator<<(std::ostream& os, const TriangularArray<T>& tri_array) -> std::ostream&
- Ostream method for TriangularArray, to be used with
std::cout. - auto propagate_first_order(const Eigen::VectorXd& du1, const Eigen::VectorXd& du2, const Eigen::VectorXd& v1, const Eigen::VectorXd& v2) -> Eigen::VectorXd
- auto operator<<(std::ostream& os, const RVineStructure& rvs) -> std::ostream&
- Ostream method for RVineStructure, to be used with
std::cout.
Enum documentation
enum class vinecopulib:: BicopFamily
A bivariate copula family identifier.
The list below summarizes each family's parameter count, parameter range, available rotations, and tail-dependence behavior. The exact parameter bounds enforced at fit time are visible via Bicop:: / Bicop::. The Kendall's-tau column refers to the closed-form mapping implemented by Bicop:: / Bicop::.
| Enumerators | |
|---|---|
| indep |
Independence copula. 0 parameters; rotationless; no tail dependence; Kendall's tau is 0. |
| gaussian |
Gaussian copula. 1 parameter (rho in (-1, 1)); rotationless; no tail dependence; Kendall's tau is (2 / pi) * arcsin(rho). |
| student |
Student-t copula. 2 parameters (rho in (-1, 1), df > 2); rotationless; symmetric tail dependence; Kendall's tau is (2 / pi) * arcsin(rho). |
| clayton |
Clayton copula. 1 parameter (theta > 0); rotations 0 / 90 / 180 / 270 degrees; lower-tail dependence; Kendall's tau is theta / (theta + 2). |
| gumbel |
Gumbel copula (also extreme-value). 1 parameter (theta >= 1); rotations 0 / 90 / 180 / 270 degrees; upper-tail dependence; Kendall's tau is 1 - 1 / theta. |
| frank |
Frank copula. 1 parameter (theta in R \ {0}); rotationless; no tail dependence; Kendall's tau given by the Debye-function form. |
| joe |
Joe copula. 1 parameter (theta >= 1); rotations 0 / 90 / 180 / 270 degrees; upper-tail dependence; Kendall's tau via a series expansion. |
| bb1 |
BB1 copula (two-parameter Archimedean). 2 parameters (theta > 0, delta >= 1); rotations 0 / 90 / 180 / 270 degrees; both lower- and upper-tail dependence; Kendall's tau in closed form. |
| bb6 |
BB6 copula (two-parameter Archimedean). 2 parameters (theta >= 1, delta >= 1); rotations 0 / 90 / 180 / 270 degrees; upper-tail dependence; Kendall's tau in closed form. |
| bb7 |
BB7 copula (two-parameter Archimedean). 2 parameters (theta >= 1, delta > 0); rotations 0 / 90 / 180 / 270 degrees; both lower- and upper-tail dependence; Kendall's tau in closed form. |
| bb8 |
BB8 copula (two-parameter Archimedean). 2 parameters (theta >= 1, delta in (0, 1]); rotations 0 / 90 / 180 / 270 degrees; upper-tail dependence; Kendall's tau in closed form. |
| tawn |
Tawn copula (extreme-value, asymmetric). 3 parameters; rotations 0 / 90 / 180 / 270 degrees; (asymmetric) upper-tail dependence; Kendall's tau via the Pickands dependence function. |
| tll |
Transformation Local Likelihood (TLL) nonparametric estimator. No finite parametric form: the copula density is fit on a grid in the inverse-normal-transformed copula space. Data-driven rotation and tail behavior; Kendall's tau is rank-based on the fitted density. |
Typedef documentation
using vinecopulib:: TreeCriterionFunction = std::function<double(const Eigen::MatrixXd&, const Eigen::VectorXd&)>
A custom edge-weight function for vine structure selection.
Maps a two-column matrix of pair-copula data and a vector of weights to a scalar dependence value. Used when tree_criterion is set to "custom". It is always called on the thread that starts the fit, so it need not be thread safe.
Function documentation
std::string vinecopulib:: get_family_name(BicopFamily family)
Converts a BicopFamily into a string with its name.
| Parameters | |
|---|---|
| family | The family. |
BicopFamily vinecopulib:: get_family_enum(const std::string& family)
Converts a string name into a BicopFamily.
| Parameters | |
|---|---|
| family | The family name. |
Eigen::MatrixXd vinecopulib:: assemble_scores(Eigen::Index n,
Eigen::Index p,
const std::function<Eigen::VectorXd(Eigen::Index)>& col)
Assembles an score matrix from a per-parameter column evaluator (col(k) returns column k). Shared by the fixed- and per-row-parameter scores() overloads so each keeps its own optimal logpdf_deriv() path (broadcast vs. per-row) while the loop lives once.
Eigen::MatrixXd vinecopulib:: assemble_hessian(Eigen::Index p,
const std::function<Eigen::VectorXd(Eigen::Index, Eigen::Index)>& col)
Assembles the averaged, symmetric Hessian from a per- second-derivative column evaluator (upper triangle only).
std::vector<Eigen::MatrixXd> vinecopulib:: assemble_hessian_full(Eigen::Index n,
Eigen::Index p,
const std::function<Eigen::VectorXd(Eigen::Index, Eigen::Index)>& col)
Assembles the per-observation, symmetric Hessians (one per row of u) from the same per- column evaluator.
template<typename T>
std::ostream& vinecopulib:: operator<<(std::ostream& os,
const TriangularArray<T>& tri_array)
Ostream method for TriangularArray, to be used with std::cout.
| Parameters | |
|---|---|
| os | An output stream. |
| tri_array | A triangular array. |
Eigen::VectorXd vinecopulib:: propagate_first_order(const Eigen::VectorXd& du1,
const Eigen::VectorXd& du2,
const Eigen::VectorXd& v1,
const Eigen::VectorXd& v2)
first-order chain-rule push-forward of an argument perturbation through an h-function output: ∂h/∂u1 · v1 + ∂h/∂u2 · v2 (shared by the gradient cascade and the Hessian's hat/til propagations).
std::ostream& vinecopulib:: operator<<(std::ostream& os,
const RVineStructure& rvs)
Ostream method for RVineStructure, to be used with std::cout.
| Parameters | |
|---|---|
| os | Output stream. |
| rvs | R-vine structure array. |