glmmTMB (version 1.0.1)

Anova.glmmTMB: Downstream methods for glmmTMB objects

Description

Methods have been written that allow glmmTMB objects to be used with several downstream packages that enable different forms of inference. In particular,

  • car::Anova constructs type-II and type-III Anova tables for the fixed effect parameters of the conditional model (this might work with the fixed effects of the zero-inflation or dispersion models, but has not been tested)

  • the effects package computes graphical tabular effect displays (again, for the fixed effects of the conditional component)

  • the emmeans package computes estimated marginal means (aka least-squares means) for the fixed effects of the conditional component

Usage

Anova.glmmTMB(
  mod,
  type = c("II", "III", 2, 3),
  test.statistic = c("Chisq", "F"),
  component = "cond",
  vcov. = vcov(mod)[[component]],
  singular.ok,
  ...
)

Effect.glmmTMB(focal.predictors, mod, ...)

recover_data.glmmTMB(object, ...)

emm_basis.glmmTMB(object, trms, xlev, grid, component = "cond", ...)

Arguments

mod

a glmmTMB model

type

type of test, "II", "III", 2, or 3. Roman numerals are equivalent to the corresponding Arabic numerals. See Anova for details.

test.statistic

unused: only valid choice is "Chisq" (i.e., Wald chi-squared test)

component

which component of the model to compute emmeans for (conditional ("cond"), zero-inflation ("zi"), or dispersion ("disp"))

vcov.

variance-covariance matrix (usually extracted automatically)

singular.ok

OK to do ANOVA with singular models (unused) ?

Additional parameters that may be supported by the method.

focal.predictors

a character vector of one or more predictors in the model in any order.

object

a glmmTMB model

trms

The terms component of object (typically with the response deleted, e.g. via delete.response

xlev

Named list of factor levels (excluding ones coerced to factors in the model formula)

grid

A data.frame (provided by ref_grid) containing the predictor settings needed in the reference grid

Details

While the examples below are disabled for earlier versions of R, they may still work; it may be necessary to refer to private versions of methods, e.g. glmmTMB:::Anova.glmmTMB(model, ...).