InformationCriteria.from_likelihood#

classmethod InformationCriteria.from_likelihood(llf, nobs, n_params)[source]#

Compute all three information criteria from a fit summary.

Parameters:
  • llf (float) – Maximized log-likelihood.

  • nobs (int) – Number of observations the likelihood was evaluated on.

  • n_params (float) – Number of free parameters, including the innovation variance. Fractional under shrinkage, which charges the effective rather than the nominal freedom.

Return type:

InformationCriteria

Returns:

The populated _InformationCriteria.

Raises:

SpecificationError – If nobs < 3 (log(log(n)) is undefined or negative below that) or n_params is negative.

Example

>>> ic = _InformationCriteria.from_likelihood(-100.0, 200, 3)
>>> round(ic.aic, 2)
206.0