Small-sample (second-order) correction to AIC():
Usage
aicc(object, ...)
# Default S3 method
aicc(object, ...)
# S3 method for class 'drmTMB'
aicc(object, ...)
# S3 method for class 'drmTMB_julia'
anova(object, ..., test = NULL)Arguments
- object
A fitted
drmTMBmodel (either engine), or any object whoselogLik()method reports"df"and"nobs"attributes.- ...
Unused; present for S3 consistency.
- test
Present only so
anova.drmTMB_julia()matches the signature ofstats::anova(); it is never consulted, because that method refuses.
Value
A single number. When \(n - k - 1 \le 0\) (too few observations
for the correction to be defined – a saturated or near-saturated model)
the value is Inf, as in DRM.jl.
Details
$$\mathrm{AICc} = \mathrm{AIC} + \frac{2k(k + 1)}{n - k - 1}$$
with \(k\) the number of estimated parameters (the "df" attribute of
logLik()) and \(n\) the number of observations (the "nobs" attribute).
The correction is strictly positive, so aicc(fit) > AIC(fit), and it
vanishes as \(n \to \infty\). Prefer AICc over AIC when \(n / k\) is
small (a common rule of thumb is \(n / k < 40\)). Like AIC, AICc compares
models fit by maximum likelihood on the same data; lower is better.
This is the R port of DRM.jl's aicc(fit) (src/comparison.jl); the two
agree to 1e-8 on the same fit.
On a REML fit the same caveat as AIC() applies and the same warning is
emitted: the restricted likelihood is comparable only across models with
identical fixed effects. Experimental MSPL fits do not expose a likelihood
and error, as they do for AIC().