If extracted_posts is NULL then posts object is used to first extract the R0 and incidence draws from posterior (note this will take longer)

hom_plot_r0_by_location(extracted_posts = NULL, posts = NULL, sort = TRUE)

Arguments

extracted_posts

object returned by hom_extract_posterior_draws

posts

Object after calling extract of stan model object of hierarchical model

sort

TRUE/FALSE. If TRUE (default), locations will be ordered by mean R0

Value

list containing: * plot - ggplot object * table - tibble object of results

Note

Naming convention throughout is snake case with prefix "hom_" to denote Hierarchical Outbreak Model

Examples

if (FALSE) { mod # RSTAN fit object posts <- rstan::extract(mod) # extract posterior from model object extracted_posts <- hom_extract_posterior_draws(posts) # get object of incidence and r0 result <- hom_plot_r0_by_location(extracted_posts=extracted_posts) # plot results show(result$plot) }