hom_plot_zeta_by_location | R Documentation |
If extracted_posts is NULL then posts object is used to first extract the zeta and incidence draws from posterior (note this will take longer)
hom_plot_zeta_by_location(extracted_posts = NULL, posts = NULL, sort = TRUE)
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 |
list containing: * plot - ggplot object * table - tibble object of results
Naming convention throughout is snake case with prefix "hom_" to denote Hierarcical Outbreak Model
## Not run: 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 zeta result <- hom_plot_zeta_by_location(extracted_posts=extracted_posts) # 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.