hom_plot_counterfactual_by_location: plot incidence and counterfactual scenario

View source: R/plotting.R

hom_plot_counterfactual_by_locationR Documentation

plot incidence and counterfactual scenario

Description

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.

Usage

hom_plot_counterfactual_by_location(
  fit,
  outbreak_cases = NULL,
  location_labels = NULL
)

Arguments

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

Value

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

Note

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

Examples

## 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)

sempwn/cr0eso documentation built on Aug. 21, 2022, 1:35 a.m.