Bicop
- class Bicop(*args, **kwargs)
A class for bivariate copula models.
The model is fully characterized by the family, rotation (one of
0
,90
,180
,270
), a matrix of parameters, and variable types (two strings, one for each variable, either"c"
for continuous or"d"
for discrete).Implemented families (see
BicopFamily
):| type | full name | string identifier | |---------------|-----------------------|-----------------------| | - | Independence | "indep" | | Elliptical | Gaussian | "gaussian" | | | Student t | "student" | | Archimedean | Clayton | "clayton" | | | Gumbel | "gumbel" | | | Frank | "frank" | | | Joe | "joe" | | | Clayton-Gumbel (BB1) | "bb1" | | | Joe-Gumbel (BB6) | "bb6" | | | Joe-Clayton (BB7) | "bb7" | | | Joe-Frank (BB8) | "bb8" | | Extreme-Value | Tawn | "tawn" | | Nonparametric | Transformation kernel | "tll" |
Attributes
family
The copula family.
nobs
The number of observations (only for fitted objects).
npars
The number of parameters (for nonparametric families, a conceptually similar definition).
parameters
The copula parameter(s).
parameters_lower_bounds
Gets lower bounds for copula parameters.
parameters_upper_bounds
Gets upper bounds for copula parameters.
rotation
The copula rotation.
tau
The Kendall's tau.
var_types
The type of the two variables.
Methods
Default constructor for the
Bicop
class.Evaluates the Akaike information criterion (AIC).
Evaluates the Bayesian information criterion (BIC).
Evaluates the copula distribution.
Fits a bivariate copula (with fixed family) to data.
Instantiates from data.
Instantiates a specific bivariate copula model.
Instantiates from a JSON file.
Instantiates from a JSON-like str object.
Evaluates the first h-function.
Evaluates the second h-function.
Evaluates the inverse of the first h-function.
Evaluates the inverse of the second h-function.
Evaluates the log-likelihood.
Evaluates the modified Bayesian information criterion (mBIC).
Converts the copula parameters to Kendall's \(tau\).
Evaluates the copula density.
Generates a plot for the Bicop object.
Selects the best fitting model.
Simulates from a bivariate copula.
Summarizes the model into a string (can be used for printing).
Converts a Kendall's \(\tau\) into copula parameters for one-parameter families.
Write the copula object into a JSON file.
Convert the copula into a nlohmann::json object.