anova.galamm: Compare likelihoods of galamm objects

View source: R/anova.galamm.R

anova.galammR Documentation

Compare likelihoods of galamm objects

Description

Anova function for comparing different GALAMMs fitted on the same data.

Usage

## S3 method for class 'galamm'
anova(object, ...)

Arguments

object

An object of class galamm returned from galamm.

...

Other fitted models of class galamm. Currently, if no models are provided in this argument, no table will be returned.

Value

A table with model comparison metric.

Author(s)

Some of the source code for this function is adapted from lme4:::anova.merMod, with authors Douglas M. Bates, Martin Maechler, Ben Bolker, and Steve Walker.

References

\insertRef

batesFittingLinearMixedEffects2015galamm

See Also

summary.galamm() for the summary method and anova() for the generic function.

Other summary functions: plot.galamm(), plot_smooth.galamm(), print.galamm(), print.summary.galamm(), summary.galamm()

Examples

# Poisson GLMM
count_mod <- galamm(
  formula = y ~ lbas * treat + lage + v4 + (1 | subj),
  data = epilep, family = poisson
)

# Model without interaction
count_mod0 <- galamm(
  formula = y ~ lbas + treat + lage + v4 + (1 | subj),
  data = epilep, family = poisson
)

# Model comparison
anova(count_mod, count_mod0)


galamm documentation built on June 8, 2025, 12:42 p.m.