hom_plot_counterfactual_by_location | R Documentation |
on same plot show counterfactual and incidence posterior predictive distributions across time and faceted by location. Shaded regions represent the 50 draws shown as lines.
hom_plot_counterfactual_by_location( fit, outbreak_cases = NULL, location_labels = NULL )
fit |
output of [seir_model_fit] |
outbreak_cases |
matrix of outbreak case data |
location_labels |
tibble with columns 'site' and 'location'. Will be used to relabel numeric location to values in 'site' column |
list containing: * plot - ggplot object * table - tibble object of results * violin_plot - ggplot object
Naming convention throughout is snake case with prefix "hom_" to denote Hierarcical Outbreak Model
## Not run: tmax <- 5 pop_size <- 100 dim(pop_size) <- c(1) example_incidence <- matrix(c(1,1,2,3,2),ncol=1) fit <- seir_model_fit(tmax,1,example_incidence,pop_size) result <- hom_plot_incidence_by_location(fit) # plot results show(result$plot) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.