AnovaTable: Compare multilevel models

View source: R/lme4tools.R

AnovaTableR Documentation

Compare multilevel models

Description

Compare multilevel models

Usage

AnovaTable(
  ...,
  fullmodel,
  models,
  serial = FALSE,
  suppress = c("AIC", "deviance", "logLik")
)

## S3 method for class 'AnovaTable'
print(x, ...)

Arguments

...

Model objects to be compared

fullmodel

A model to which all other models are to be compared; only use if ... is not specified.

models

Models to compare to fullmodel. Only use if ... is not specified.

serial

If TRUE, models are compared serially; if false, all models will be compared to the first.

suppress

Character vector of column names to suppress in printed output.

x

an AnovaTable object

Value

A data.frame containing model fit metrics such as AIC, BIC, marginal R-squared (the effect size of fixed effects only), conditional R-squared (the effect size of all model terms), loglikelihood, deviance, and a likelihood ratio test.

Methods (by generic)

  • print(AnovaTable): Print generic for anova tables.

Examples

library(lmerTest)
data("sleepstudy", package="lme4")
m1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
m2 <- lmer(Reaction ~ Days + (1 | Subject), sleepstudy)
AnovaTable(m1,m2)


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.