Learn R Programming

insight (version 0.18.6)

null_model: Compute intercept-only model for regression models

Description

This function computes the null-model (i.e. (y ~ 1)) of a model. For mixed models, the null-model takes random effects into account.

Usage

null_model(model, verbose = TRUE, ...)

Value

The null-model of x

Arguments

model

A (mixed effects) model.

verbose

Toggle off warnings.

...

Arguments passed to or from other methods.

Examples

Run this code
if (require("lme4")) {
  data(sleepstudy)
  m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
  summary(m)
  summary(null_model(m))
}

Run the code above in your browser using DataLab