copulae.archimedean.
ClaytonCopula
The Clayton copula is a copula that allows any specific non-zero level of (lower) tail dependency between individual variables. It is an Archimedean copula and exchangeable. A Clayton copula is defined as
bounds
Gets the bounds for the parameters
Lower and upper bound of the copula’s parameters
(scalar or array_like, scalar or array_like)
dim
Number of dimensions in copula
fit
Fit the copula with specified data
data (ndarray) – Array of data used to fit copula. Usually, data should be the pseudo observations
x0 (ndarray) – Initial starting point. If value is None, best starting point will be estimated
method ({ 'ml', 'irho', 'itau' }, optional) – Method of fitting. Supported methods are: ‘ml’ - Maximum Likelihood, ‘irho’ - Inverse Spearman Rho, ‘itau’ - Inverse Kendall Tau
optim_options (dict, optional) – Keyword arguments to pass into scipy.optimize.minimize()
scipy.optimize.minimize()
ties ({ 'average', 'min', 'max', 'dense', 'ordinal' }, optional) – Specifies how ranks should be computed if there are ties in any of the coordinate samples. This is effective only if the data has not been converted to its pseudo observations form
verbose (int, optional) – Log level for the estimator. The higher the number, the more verbose it is. 0 prints nothing.
to_pobs (bool) – If True, casts the input data along the column axis to uniform marginals (i.e. convert variables to values between [0, 1]). Set this to False if the input data are already uniform marginals.
scale (float) – Amount to scale the objective function value of the numerical optimizer. This is helpful in achieving higher accuracy as it increases the sensitivity of the optimizer. The downside is that the optimizer could likely run longer as a result. Defaults to 1.
See also
pobs()
The psuedo-observation method converts non-uniform data into uniform marginals.
scipy.optimize.minimize
the scipy minimize function use for optimization
log_lik
Returns the log likelihood (LL) of the copula given the data.
The greater the LL (closer to \(\infty\)) the better.
data (Union[ndarray, DataFrame]) – Data set used to calculate the log likelihood
Union
ndarray
DataFrame
to_pobs – If True, converts the data input to pseudo observations.
ties (Literal[‘average’, ‘min’, ‘max’, ‘dense’, ‘ordinal’]) – Specifies how ranks should be computed if there are ties in any of the coordinate samples. This is effective only if to_pobs is True.
Literal
to_pobs
Log Likelihood
float
params
The parameter set which describes the copula
pobs
Compute the pseudo-observations for the given data matrix
data ({ array_like, DataFrame }) – Random variates to be converted to pseudo-observations
ties ({ 'average', 'min', 'max', 'dense', 'ordinal' }, optional) – Specifies how ranks should be computed if there are ties in any of the coordinate samples
matrix or vector of the same dimension as data containing the pseudo observations
pseudo_obs()
The pseudo-observations function