Skip to content

Likelihood and Information Criteria

Ivan Svetunkov edited this page Apr 10, 2026 · 7 revisions

Likelihood, Information Criteria et al.

This page documents methods for evaluating model fit, comparing models, and assessing forecast accuracy in smooth models.

Note: In Python, loglik, aic, aicc, bic, and bicc are available as properties. Other methods (pointLik, pAIC, pBIC, accuracy) are not yet implemented.

Likelihood Functions

logLik()

Extracts the log-likelihood value from the fitted model.

R Usage

model <- adam(AirPassengers, "MMM", lags=12)

# Get log-likelihood
ll <- logLik(model)
print(ll)

# Access the value
as.numeric(ll)

# Degrees of freedom
attr(ll, "df")

Python Usage

from smooth import ADAM

model = ADAM(model="MMM", lags=12)
model.fit(y)

# Get log-likelihood
ll = model.loglik

Output

R: Returns an object of class "logLik" containing:

  • The log-likelihood value
  • Degrees of freedom (number of estimated parameters)
  • Number of observations

Python: Returns a float with the log-likelihood value.

pointLik()

Returns a vector of point log-likelihoods for each in-sample observation. Useful for identifying observations that contribute most to the likelihood.

Read the paper about this: DOI 10.1080/01605682.2026.2620516 or on github.

Python: Not yet implemented.

R Usage

library(greybox)  # Required for pointLik functions

model <- adam(AirPassengers, "MMM", lags=12)

# Point log-likelihoods
pll <- pointLik(model)

# Sum equals total log-likelihood
sum(pll)
logLik(model)

# Identify problematic observations
which.min(pll)  # Worst fitting observation

# Plot
plot(pll, type="h", main="Point Log-Likelihoods")
abline(h=0, col="red")

Use Cases

  • Identify outliers (observations with very low likelihood)
  • Diagnostic for model specification
  • Used in point information criteria (pAIC, pBIC etc)

Information Criteria

AIC, AICc, BIC, BICc

Standard information criteria for model selection.

Read more about information criteria in Section 16.4 of Svetunkov et al. (2026).

R Usage

model <- adam(AirPassengers, "MMM", lags=12)

# Individual criteria
AIC(model)   # Akaike Information Criterion
AICc(model)  # Corrected AIC (for small samples)
BIC(model)   # Bayesian Information Criterion
BICc(model)  # Corrected BIC

Python Usage

from smooth import ADAM

model = ADAM(model="MMM", lags=12)
model.fit(y)

# Individual criteria
model.aic    # Akaike Information Criterion
model.aicc   # Corrected AIC (for small samples)
model.bic    # Bayesian Information Criterion
model.bicc   # Corrected BIC

Output

R: Returns numeric values for each criterion.

Python: Each property returns a float.

Formulas

Criterion Formula Best For
AIC -2·logLik + 2·k General use
AICc AIC + 2k(k+1)/(n-k-1) Small samples (n/k < 40)
BIC -2·logLik + k·log(n) Large samples, parsimony
BICc BIC + k·(log(n)+1)·k/(n-k-1) Small samples, parsimony

Where k = number of parameters, n = number of observations.

Comparing Models

# Fit different models
model1 <- adam(AirPassengers, "ANN", lags=12)
model2 <- adam(AirPassengers, "AAN", lags=12)
model3 <- adam(AirPassengers, "AAA", lags=12)

# Compare using AICc
AICc(model1)
AICc(model2)
AICc(model3)

# Lower is better
models <- list(model1, model2, model3)
sapply(models, AICc)

Point Information Criteria

Point versions of information criteria based on pointLik(). These help identify observations that contribute most to model complexity.

Python: Not yet implemented.

R Usage

library(greybox)  # Required for point IC functions

model <- adam(AirPassengers, "MMM", lags=12)

# Point information criteria
pAIC(model)
pAICc(model)
pBIC(model)
pBICc(model)

These return vectors (one value per observation) rather than single values.

Accuracy

accuracy()

Computes various accuracy measures for the model's forecasts.

Python: Not yet implemented.

R Usage

model <- adam(AirPassengers, "MMM", lags=12, h=12, holdout=TRUE)

# Compute accuracy measures
accuracy(model)

Measures Returned

See details in measured() function from the greybox package.

See Also

Clone this wiki locally