This function returns model selection criteria used to compare the quality of different models.
All criteria are defined such that lower values indicate better models (i.e., the goal is minimization).
If you wish to compare models using a maximization approach (e.g., log-likelihood),
you can multiply the result by -1.
Note: The predefined string options (e.g., "AIC") are not the same as the built-in R functions AIC() or BIC().
In particular, the values returned by this function are adjusted by dividing by the sample size n
(i.e., normalized AIC/BIC), which makes it more comparable across datasets of different sizes.
The function returns:
"AIC": \( \frac{2k - 2\ell}{n} \) Akaike Information Criterion divided by n.
"BIC": \( \frac{\log(n) \cdot k - 2\ell}{n} \) Bayesian Information Criterion divided by n.
"AICc": \( \frac{2k(k+1)}{n - k - 1} + \frac{2k - 2\ell}{n} \) Corrected Akaike Information Criterion divided by n.
"HQ": \( \frac{2 \log(\log(n)) \cdot k - 2\ell}{n} \) Hannan–Quinn Criterion divided by n.
where:
\(k\) is the number of parameters,
\(n\) is the sample size,
\(\ell\) is the log-likelihood of the model.
If cr is a function, it is called with the fitted model and any additional arguments passed through ....