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.

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

# \donttest{

# 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()
#> Warning: error in default universe
#> Error in eval(predvars, data, env) : object 'femininity' not found
#> pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env)
#> Warning: error in universe 1
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 2
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 3
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 4
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 5
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 6
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 7
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 8
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 9
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 10
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 11
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
#> Warning: error in universe 12
#> Error in eval(predvars, data, env) : object 'femininity' not found
#>  pkgdown::build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> map_ -> with_indexed_errors -> withCallingHandlers -> call_with_cleanup -> .f -> withCallingHandlers -> data_reference_topic -> run_examples -> highlight_examples -> downlit::evaluate_and_highlight -> evaluate::evaluate -> evaluate_call -> timing_fn -> handle -> try - f, silent = TRUE) -> withCallingHandlers -> withVisible -> eval_with_user_handlers -> eval -> eval -> create_multiverse -> glm.nb_mverse -> execute_multiverse -> execute_multiverse.mverse -> multiverse::execute_multiverse -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> MASS::glm.nb -> eval.parent -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env) 
#> 
# }