Learn R Programming

insight (version 0.20.5)

get_deviance: Model Deviance

Description

Returns model deviance (see stats::deviance()).

Usage

get_deviance(x, ...)

# S3 method for default get_deviance(x, verbose = TRUE, ...)

Value

The model deviance.

Arguments

x

A model.

...

Not used.

verbose

Toggle warnings and messages.

Details

For GLMMs of class glmerMod, glmmTMB or MixMod, the absolute unconditional deviance is returned (see 'Details' in ?lme4::merMod-class), i.e. minus twice the log-likelihood. To get the relative conditional deviance (relative to a saturated model, conditioned on the conditional modes of random effects), use deviance(). The value returned get_deviance() usually equals the deviance-value from the summary().

Examples

Run this code
data(mtcars)
x <- lm(mpg ~ cyl, data = mtcars)
get_deviance(x)

Run the code above in your browser using DataLab