copulas.bivariate.clayton module
Clayton module.
- class copulas.bivariate.clayton.Clayton(*args, **kwargs)[source]
Bases:
BivariateClass for clayton copula model.
- compute_theta()[source]
Compute theta parameter using Kendall’s tau.
On Clayton copula this is
\[τ = θ/(θ + 2) \implies θ = 2τ/(1-τ)\]\[θ ∈ (0, ∞)\]On the corner case of \(τ = 1\), return infinite.
- copula_type = 0
- cumulative_distribution(X)[source]
Compute the cumulative distribution function for the clayton copula.
The cumulative density(cdf), or distribution function for the Clayton family of copulas correspond to the formula:
\[C(u,v) = (u^{-θ} + v^{-θ} - 1)^{-1/θ}\]- Parameters:
X (numpy.ndarray)
- Returns:
cumulative probability.
- Return type:
numpy.ndarray
- generator(t)[source]
Compute the generator function for Clayton copula family.
The generator is a function \(\psi: [0,1]\times\Theta \rightarrow [0, \infty)\) # noqa: JS101
that given an Archimedian copula fulfills: .. math:: C(u,v) = psi^{-1}(psi(u) + psi(v))
- Parameters:
t (numpy.ndarray)
- Returns:
numpy.ndarray
- invalid_thetas = []
- partial_derivative(X)[source]
Compute partial derivative of cumulative distribution.
The partial derivative of the copula(CDF) is the conditional CDF.
\[F(v|u) = \frac{\partial C(u,v)}{\partial u} = u^{- \theta - 1}(u^{-\theta} + v^{-\theta} - 1)^{-\frac{\theta+1}{\theta}}\]- Parameters:
X (np.ndarray)
y (float)
- Returns:
Derivatives
- Return type:
numpy.ndarray
- percent_point(y, V)[source]
Compute the inverse of conditional cumulative distribution \(C(u|v)^{-1}\).
- Parameters:
y (numpy.ndarray) – Value of \(C(u|v)\).
v (numpy.ndarray) – given value of v.
- probability_density(X)[source]
Compute probability density function for given copula family.
The probability density(PDF) for the Clayton family of copulas correspond to the formula:
\[c(U,V) = \frac{\partial^2}{\partial v \partial u}C(u,v) = (\theta + 1)(uv)^{-\theta-1}(u^{-\theta} + v^{-\theta} - 1)^{-\frac{2\theta + 1}{\theta}}\]- Parameters:
X (numpy.ndarray)
- Returns:
Probability density for the input values.
- Return type:
numpy.ndarray
- theta_interval = [0, inf]