This method returns the multiverse table displaying all universes defined by the multiverse. Each row corresponds to a universe and each column represents a branch.

# S3 method for mverse
summary(object, ...)

# S3 method for lm_mverse
summary(object, conf.int = TRUE, conf.level = 0.95, output = "estimates", ...)

# S3 method for glm_mverse
summary(object, conf.int = TRUE, conf.level = 0.95, output = "estimates", ...)

# S3 method for glm.nb_mverse
summary(object, conf.int = TRUE, conf.level = 0.95, output = "estimates", ...)

Arguments

object

a glm.nb_mverse object.

...

Ignored.

conf.int

When TRUE (default), the estimate output includes the confidence intervals.

conf.level

The confidence level of the confidence interval returned using conf.int = TRUE. Default value is 0.95.

output

The output of interest. The possible values are "estimates" ("e"), "df", "deviance" ("de"), and "aic" ("bic"). Alternatively, the first letters may be used. Default value is "estimates".

Value

a multiverse table as a tibble.

Details

When you pass a mverse objected fitted with model, the summary table includes results of the fitted models across the multiverse.

Examples

# \donttest{

# Displaying the multiverse table without any fitted values.
hurricane_strength <- mutate_branch(
  NDAM,
  HighestWindSpeed,
  Minpressure_Updated_2014
)
mv <- create_multiverse(hurricane) %>%
  add_mutate_branch(hurricane_strength)
summary(mv)
#> # A tibble: 3 × 2
#>   universe hurricane_strength_branch
#>   <fct>    <fct>                    
#> 1 1        NDAM                     
#> 2 2        HighestWindSpeed         
#> 3 3        Minpressure_Updated_2014 
## Displaying after adding a a filter branch.
hurricane_outliers <- filter_branch(
  !Name %in% c("Katrina", "Audrey", "Andrew"),
  !Name %in% c("Katrina"),
  !Name %in% c("Katrina"),
  TRUE # include all
)
mv <- add_filter_branch(mv, hurricane_outliers)
summary(mv)
#> # A tibble: 12 × 3
#>    universe hurricane_strength_branch hurricane_outliers_branch                 
#>    <fct>    <fct>                     <fct>                                     
#>  1 1        NDAM                      "!Name %in% c(\"Katrina\", \"Audrey\", \"…
#>  2 2        NDAM                      "!Name %in% c(\"Katrina\")"               
#>  3 3        NDAM                      "!Name %in% c(\"Katrina\")"               
#>  4 4        NDAM                      "TRUE"                                    
#>  5 5        HighestWindSpeed          "!Name %in% c(\"Katrina\", \"Audrey\", \"…
#>  6 6        HighestWindSpeed          "!Name %in% c(\"Katrina\")"               
#>  7 7        HighestWindSpeed          "!Name %in% c(\"Katrina\")"               
#>  8 8        HighestWindSpeed          "TRUE"                                    
#>  9 9        Minpressure_Updated_2014  "!Name %in% c(\"Katrina\", \"Audrey\", \"…
#> 10 10       Minpressure_Updated_2014  "!Name %in% c(\"Katrina\")"               
#> 11 11       Minpressure_Updated_2014  "!Name %in% c(\"Katrina\")"               
#> 12 12       Minpressure_Updated_2014  "TRUE"                                    
# }
# \donttest{

# Displaying the multiverse table with \code{lm} models fitted.
hurricane_strength <- mutate_branch(
  NDAM,
  HighestWindSpeed,
  Minpressure_Updated_2014
)
y <- mutate_branch(
  alldeaths, log(alldeaths + 1)
)
hurricane_outliers <- filter_branch(
  !Name %in% c("Katrina", "Audrey", "Andrew"),
  TRUE # include all
)
model_specifications <- formula_branch(
  y ~ femininity,
  y ~ femininity + hurricane_strength
)
mv <- create_multiverse(hurricane) %>%
  add_filter_branch(hurricane_outliers) %>%
  add_mutate_branch(hurricane_strength, y) %>%
  add_formula_branch(model_specifications) %>%
  lm_mverse()
#> Warning: error in default universe
#> Error in eval(predvars, data, env) : object 'femininity' not found
#> pkgdown::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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 -> lm_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> stats::lm -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env)
summary(mv)
#> Warning: error in default universe
#> Error in summary(model) : object 'model' not found
#> pkgdown::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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 -> summary -> summary.lm_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> summary -> summary(model)
#> # A tibble: 24 × 6
#>    universe hurricane_outliers… hurricane_stren… y_branch model_specifica… out  
#>    <fct>    <fct>               <fct>            <fct>    <fct>            <lgl>
#>  1 1        "!Name %in% c(\"Ka… NDAM             alldeat… y ~ femininity   NA   
#>  2 2        "!Name %in% c(\"Ka… NDAM             alldeat… y ~ femininity … NA   
#>  3 3        "!Name %in% c(\"Ka… NDAM             log(all… y ~ femininity   NA   
#>  4 4        "!Name %in% c(\"Ka… NDAM             log(all… y ~ femininity … NA   
#>  5 5        "!Name %in% c(\"Ka… HighestWindSpeed alldeat… y ~ femininity   NA   
#>  6 6        "!Name %in% c(\"Ka… HighestWindSpeed alldeat… y ~ femininity … NA   
#>  7 7        "!Name %in% c(\"Ka… HighestWindSpeed log(all… y ~ femininity   NA   
#>  8 8        "!Name %in% c(\"Ka… HighestWindSpeed log(all… y ~ femininity … NA   
#>  9 9        "!Name %in% c(\"Ka… Minpressure_Upd… alldeat… y ~ femininity   NA   
#> 10 10       "!Name %in% c(\"Ka… Minpressure_Upd… alldeat… y ~ femininity … NA   
#> # … with 14 more rows
# }
# \donttest{

# Displaying the multiverse table with \code{glm} models fitted.
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
)
model_distributions <- family_branch(poisson)
mv <- create_multiverse(hurricane) %>%
  add_filter_branch(hurricane_outliers) %>%
  add_mutate_branch(hurricane_strength) %>%
  add_formula_branch(model_specifications) %>%
  add_family_branch(model_distributions) %>%
  glm_mverse()
#> Warning: error in default universe
#> Error in eval(predvars, data, env) : object 'femininity' not found
#> pkgdown::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> stats::glm -> eval -> eval -> stats::model.frame -> model.frame.default -> eval -> eval -> eval(predvars, data, env)
summary(mv)
#> Warning: error in default universe
#> Error in summary(model) : object 'model' not found
#> pkgdown::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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 -> summary -> summary.glm_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> summary -> summary(model)
#> # A tibble: 12 × 6
#>    universe hurricane_outlie… hurricane_stren… model_specifica… model_distribut…
#>    <fct>    <fct>             <fct>            <fct>            <fct>           
#>  1 1        "!Name %in% c(\"… NDAM             alldeaths ~ fem… poisson         
#>  2 2        "!Name %in% c(\"… NDAM             alldeaths ~ fem… poisson         
#>  3 3        "!Name %in% c(\"… HighestWindSpeed alldeaths ~ fem… poisson         
#>  4 4        "!Name %in% c(\"… HighestWindSpeed alldeaths ~ fem… poisson         
#>  5 5        "!Name %in% c(\"… Minpressure_Upd… alldeaths ~ fem… poisson         
#>  6 6        "!Name %in% c(\"… Minpressure_Upd… alldeaths ~ fem… poisson         
#>  7 7        "TRUE"            NDAM             alldeaths ~ fem… poisson         
#>  8 8        "TRUE"            NDAM             alldeaths ~ fem… poisson         
#>  9 9        "TRUE"            HighestWindSpeed alldeaths ~ fem… poisson         
#> 10 10       "TRUE"            HighestWindSpeed alldeaths ~ fem… poisson         
#> 11 11       "TRUE"            Minpressure_Upd… alldeaths ~ fem… poisson         
#> 12 12       "TRUE"            Minpressure_Upd… alldeaths ~ fem… poisson         
#> # … with 1 more variable: out <lgl>
# }
# \donttest{

# Displaying the multiverse table with \code{glm.nb} models fitted.
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::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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)
summary(mv)
#> Warning: error in default universe
#> Error in summary(model) : object 'model' not found
#> pkgdown::deploy_to_branch -> build_site_github_pages -> build_site -> build_site_local -> build_reference -> purrr::map -> .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 -> summary -> summary.glm.nb_mverse -> multiverse::inside -> execute_universe -> mapply ->  -> execute_code_from_universe -> tryStack -> lapply -> FUN -> FUN -> summary -> summary(model)
#> # A tibble: 12 × 5
#>    universe hurricane_outliers_branch    hurricane_stren… model_specifica… out  
#>    <fct>    <fct>                        <fct>            <fct>            <lgl>
#>  1 1        "!Name %in% c(\"Katrina\", … NDAM             alldeaths ~ fem… NA   
#>  2 2        "!Name %in% c(\"Katrina\", … NDAM             alldeaths ~ fem… NA   
#>  3 3        "!Name %in% c(\"Katrina\", … HighestWindSpeed alldeaths ~ fem… NA   
#>  4 4        "!Name %in% c(\"Katrina\", … HighestWindSpeed alldeaths ~ fem… NA   
#>  5 5        "!Name %in% c(\"Katrina\", … Minpressure_Upd… alldeaths ~ fem… NA   
#>  6 6        "!Name %in% c(\"Katrina\", … Minpressure_Upd… alldeaths ~ fem… NA   
#>  7 7        "TRUE"                       NDAM             alldeaths ~ fem… NA   
#>  8 8        "TRUE"                       NDAM             alldeaths ~ fem… NA   
#>  9 9        "TRUE"                       HighestWindSpeed alldeaths ~ fem… NA   
#> 10 10       "TRUE"                       HighestWindSpeed alldeaths ~ fem… NA   
#> 11 11       "TRUE"                       Minpressure_Upd… alldeaths ~ fem… NA   
#> 12 12       "TRUE"                       Minpressure_Upd… alldeaths ~ fem… NA   
# }