statsmodels.distributions.copula.api.GaussianCopula¶
- class statsmodels.distributions.copula.api.GaussianCopula(corr=None, k_dim=2)[source]¶
Gaussian copula.
It is constructed from a multivariate normal distribution over \(\mathbb{R}^d\) by using the probability integral transform.
For a given correlation matrix \(R \in[-1, 1]^{d \times d}\), the Gaussian copula with parameter matrix \(R\) can be written as:
\[C_R^{\text{Gauss}}(u) = \Phi_R\left(\Phi^{-1}(u_1),\dots, \Phi^{-1}(u_d) \right),\]where \(\Phi^{-1}\) is the inverse cumulative distribution function of a standard normal and \(\Phi_R\) is the joint cumulative distribution function of a multivariate normal distribution with mean vector zero and covariance matrix equal to the correlation matrix \(R\).
- Parameters:
- corrscalar or array_like
Correlation or scatter matrix for the elliptical copula. In the bivariate case,
corr` can be a scalar and is then considered as the correlation coefficient. If ``corr
is None, then the scatter matrix is the identity matrix.- k_dim
int
Dimension, number of components in the multivariate random variable.
Notes
Elliptical copulas require that copula parameters are set when the instance is created. Those parameters currently cannot be provided in the call to methods. (This will most likely change in future versions.) If non-empty
args
are provided in methods, then a ValueError is raised. Theargs
keyword is provided for a consistent interface across copulas.References
[1]Joe, Harry, 2014, Dependence modeling with copulas. CRC press. p. 163
Methods
cdf
(u[, args])Cumulative distribution function evaluated at points u.
corr_from_tau
(tau)Pearson correlation from kendall's tau.
dependence_tail
([corr])Bivariate tail dependence parameter.
fit_corr_param
(data)Copula correlation parameter using Kendall's tau of sample data.
logpdf
(u[, args])Log of copula pdf, loglikelihood.
pdf
(u[, args])Probability density function of copula.
plot_pdf
([ticks_nbr, ax])Plot the PDF.
plot_scatter
([sample, nobs, random_state, ax])Sample the copula and plot.
rvs
([nobs, args, random_state])Draw n in the half-open interval
[0, 1)
.tau
([corr])Bivariate kendall's tau based on correlation coefficient.
tau_simulated
([nobs, random_state])Kendall's tau based on simulated samples.