This function computes the null-model (i.e. (y ~ 1)
) of
a model. For mixed models, the null-model takes random effects into account.
Arguments
- model
A (mixed effects) model.
- verbose
Toggle off warnings.
- ...
Arguments passed to or from other methods.
Examples
if (require("lme4")) {
data(sleepstudy)
m <- lmer(Reaction ~ Days + (1 + Days | Subject), data = sleepstudy)
summary(m)
summary(null_model(m))
}
#> Linear mixed model fit by REML ['lmerMod']
#> Formula: Reaction ~ (1 + Days | Subject)
#> Data: sleepstudy
#>
#> REML criterion at convergence: 1769.8
#>
#> Scaled residuals:
#> Min 1Q Median 3Q Max
#> -4.0449 -0.4486 0.0089 0.4819 5.2186
#>
#> Random effects:
#> Groups Name Variance Std.Dev. Corr
#> Subject (Intercept) 651.6 25.53
#> Days 142.2 11.93 -0.18
#> Residual 654.9 25.59
#> Number of obs: 180, groups: Subject, 18
#>
#> Fixed effects:
#> Estimate Std. Error t value
#> (Intercept) 257.76 6.76 38.13