Computes the deviance, which is useful for model comparison.

# S3 method for class 'fisher_mle'
deviance(object, null_model = NULL, ...)

Arguments

object

A fisher_mle object

null_model

Optional reduced/null model for comparison

...

Additional arguments (ignored)

Value

Deviance value

Details

When called with a single model, returns -2 * logL (the deviance relative to a saturated model).

When called with two models, returns the deviance difference: D = 2 * (logL_full - logL_reduced)

Under the null hypothesis that the reduced model is correct, D is asymptotically chi-squared with df = p_full - p_reduced.