|
| def | __init__ (self, rotation=0) |
| | Init copula. More...
|
| |
| def | cdf (self, u, v, theta) |
| | Evaluate the copula's CDF function. More...
|
| |
| def | pdf (self, u, v, theta) |
| | Public facing PDF function. More...
|
| |
|
def | h (self, u, v, theta) |
| |
|
def | hinv (self, u, v, theta) |
| |
| def | fitMLE (self, u, v, theta0, kwargs) |
| | Maximum likelyhood copula fit. More...
|
| |
| def | sample (self, n=1000, mytheta) |
| | Draw N samples from the copula. More...
|
| |
| def | setRotation (self, rotation=0) |
| | Set the copula's orientation: Allows for modeling negative dependence with the frank, gumbel, and clayton copulas (Archimedean Copula family is non-symmetric) More...
|
| |
|
def | kTau (self, rotation=0, theta) |
| | Public facing kendall's tau function.
|
| |
|
| def | _pdf (self, u, v, rotation=0, theta) |
| | Pure virtual density function. More...
|
| |
| def | _cdf (self, u, v, rotation=0, theta) |
| | Default implementation of the cumulative density function. More...
|
| |
| def | _ppf (self, u, v, rotation=0, theta) |
| | Percentile point function. More...
|
| |
| def | _h (self, u, v, rotation=0, theta) |
| | Copula conditional distribution function. More...
|
| |
|
def | _hinv (self, u, v, rotation=0, theta) |
| | Inverse H function.
|
| |
| def | _v (self, u, v, rotation=0, theta) |
| | Copula conditional distribution function. More...
|
| |
|
def | _vinv (self, u, v, rotation=0, theta) |
| |
| def | _nlogLike (self, u, v, rotation=0, theta) |
| | Default negative log likelyhood function. More...
|
| |
|
def | _logLike (self, u, v, rotation=0, theta) |
| | Default log likelyhood func.
|
| |
| def | _invhfun_bisect (self, U, V, rotation, theta) |
| | Compute inverse of H function using bisection. More...
|
| |
| def | _AIC (self, u, v, rotation=0, theta) |
| | Estimate the AIC of a fitted copula (with params == theta) More...
|
| |
|
def | _gen (self, t, theta) |
| | Copula generator function.
|
| |
| def | _kTau (self, rotation=0, theta) |
| | Computes Kendall's tau. More...
|
| |
|
def | _rotPDF (cls, f) |
| | Define copula probability density function rotation.
|
| |
|
def | _rotCDF (cls, f) |
| | Define copula cumulative density function rotation.
|
| |
|
def | _rotHinv (cls, f) |
| | Define copula dependence function rotation.
|
| |
|
def | _rotH (cls, f) |
| | Define copula inverse dependence function rotation.
|
| |
|
def | _rotGen (cls, f) |
| | Copula generator wrapper.
|
| |
Bivariate Copula base class.
Meant to be subclassed with the PDF and CDF methods being overridden for a given specific copula.
Copula can be rotated by 90, 180, 270 degrees to accommodate negative dependence.
| def starvine.bvcopula.copula.copula_base.CopulaBase._kTau |
( |
|
self, |
|
|
|
rotation = 0, |
|
|
|
theta |
|
) |
| |
|
private |
Computes Kendall's tau.
Requires that the copula has a _gen() method implemented. This method should be overridden if an analytic form of kendall's tau is avalible.
Let
represent a random variable and
is an RV distributed according to
.
where
is the copula generating function.
Note: For the gauss and students-t copula:
where
is the linear correlation coefficient.
| def starvine.bvcopula.copula.copula_base.CopulaBase._ppf |
( |
|
self, |
|
|
|
u, |
|
|
|
v, |
|
|
|
rotation = 0, |
|
|
|
theta |
|
) |
| |
|
private |
Percentile point function.
Equivilent to the inverse of the CDF. Used to draw random samples from the bivariate distribution.
EX: will draw 100 samples from a t-copula with params [0.21, 20]
>>> import starvine.bvcopula as bvc
>>> My_Copula = bvc.t_copula.StudentTCopula()
>>> u, v = np.random.uniform(0, 1, 100)
>>> My_Copula._ppf(u, v, rotation=0, 0.21, 20)