glm.nb_mverse {mverse}R Documentation

Fit negative binomial regression models across the multiverse

Description

glm.nb_mverse fits MASS::glm.nb across the multiverse according to model specifications provided by formula_branch. At least one formula_branch must have been added.

Usage

glm.nb_mverse(.mverse)

Arguments

.mverse

a mverse object.

Value

A mverse object with glm.nb fitted.

See Also

Other model fitting functions: glm_mverse(), lm_mverse()

Examples



# Fitting \code{glm.nb} models across a multiverse.
hurricane_strength <- mutate_branch(
  NDAM,
  HighestWindSpeed,
  Minpressure_Updated_2014
)
hurricane_outliers <- filter_branch(
  !Name %in% c("Katrina", "Audrey", "Andrew"),
  TRUE # include all
)
model_specifications <- formula_branch(
  alldeaths ~ femininity,
  alldeaths ~ femininity + hurricane_strength
)
mv <- create_multiverse(hurricane) %>%
  add_filter_branch(hurricane_outliers) %>%
  add_mutate_branch(hurricane_strength) %>%
  add_formula_branch(model_specifications) %>%
  glm.nb_mverse()


[Package mverse version 0.1.0 Index]