# arch.univariate.GeneralizedError.loglikelihood¶

GeneralizedError.loglikelihood(parameters, resids, sigma2, individual=False)[source]

Computes the log-likelihood of assuming residuals are have a Generalized Error Distribution, conditional on the variance.

Parameters
• parameters (ndarray) – Shape parameter of the GED distribution

• resids (ndarray) – The residuals to use in the log-likelihood calculation

• sigma2 (ndarray) – Conditional variances of resids

• individual (bool, optional) – Flag indicating whether to return the vector of individual log likelihoods (True) or the sum (False)

Returns

ll – The log-likelihood

Return type

float

Notes

The log-likelihood of a single data point x is

$\ln\nu-\ln c-\ln\Gamma(\frac{1}{\nu})+(1+\frac{1}{\nu})\ln2 -\frac{1}{2}\ln\sigma^{2} -\frac{1}{2}\left|\frac{x}{c\sigma}\right|^{\nu}$

where $$\Gamma$$ is the gamma function and $$\ln c$$ is

$\ln c=\frac{1}{2}\left(\frac{-2}{\nu}\ln2+\ln\Gamma(\frac{1}{\nu}) -\ln\Gamma(\frac{3}{\nu})\right).$