aic_inad: Akaike information criterion for fitted INAD models

View source: R/bic_inad.R

aic_inadR Documentation

Akaike information criterion for fitted INAD models

Description

Computes AIC using the fitted log likelihood and a parameter count that respects structural zeros and identifiability constraints.

Usage

aic_inad(fit)

Arguments

fit

A fitted model object returned by fit_inad.

Details

The AIC is computed as:

AIC = -2 \times \ell + 2k

where \ell is the log-likelihood and k is the number of free parameters.

Value

A numeric scalar AIC value.

Examples

set.seed(1)
y <- simulate_inad(
  n_subjects = 40,
  n_time = 5,
  order = 1,
  thinning = "binom",
  innovation = "pois",
  alpha = 0.3,
  theta = 2
)
fit <- fit_inad(y, order = 1, thinning = "binom", innovation = "pois", max_iter = 20)
aic_inad(fit)

antedep documentation built on April 25, 2026, 1:06 a.m.