Learn R Programming

galamm (version 0.2.2)

anova.galamm: Compare likelihoods of galamm objects

Description

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

Usage

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

Value

A table with model comparison metric.

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.

Author

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

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

Run this code
# 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)

Run the code above in your browser using DataLab