arch.univariate.StudentsT.loglikelihood

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

Computes the log-likelihood of assuming residuals are have a standardized (to have unit variance) Student’s t distribution, conditional on the variance.

Parameters
  • parameters (ndarray) – Shape parameter of the t 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\Gamma\left(\frac{\nu+1}{2}\right) -\ln\Gamma\left(\frac{\nu}{2}\right) -\frac{1}{2}\ln(\pi\left(\nu-2\right)\sigma^{2}) -\frac{\nu+1}{2}\ln(1+x^{2}/(\sigma^{2}(\nu-2)))\]

where \(\Gamma\) is the gamma function.