Computes AIC using the fitted log likelihood and a parameter count for categorical antedependence parameters.
Arguments
- fit
A fitted model object of class
"cat_fit"returned byfit_cat.
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.
Examples
set.seed(1)
y <- simulate_cat(40, 5, order = 1, n_categories = 2)
fit <- fit_cat(y, order = 1)
aic_cat(fit)
#> [1] 288.5537