When a single model is provided, the function returns a table showing the
residual degrees of freedom and deviance.
When multiple models are provided, the function compares them using likelihood
ratio tests (LRT). Models are automatically ordered by their complexity
(degrees of freedom). The LRT statistic is computed as:
$$LRT = 2(\ell_1 - \ell_0)$$
where \(\ell_1\) is the log-likelihood of the more complex model and
\(\ell_0\) is the log-likelihood of the simpler (nested) model. Under the
null hypothesis that the simpler model is adequate, the LRT statistic follows
a chi-squared distribution with degrees of freedom equal to the difference in
the number of parameters between the models.
Important: This method assumes that the models being compared are
nested (i.e., one model is a special case of the other) and fitted to the
same data. Comparing non-nested models or models fitted to different datasets
will produce unreliable results. Use AIC or BIC
for comparing non-nested models.
The deviance is defined as \(-2 \times \text{log-likelihood}\). For models
fitted by maximum likelihood, smaller (more negative) deviances indicate
better fit. Note that deviance can be negative when the log-likelihood is
positive, which occurs when density values exceed 1 (common in continuous
distributions on bounded intervals). What matters for inference is the
change in deviance between models, which should be positive when
the more complex model fits better.