plot.disbayes_hier: Quick plot of estimates from hierarchical disbayes models...

View source: R/disbayes_hier.R

plot.disbayes_hierR Documentation

Quick plot of estimates from hierarchical disbayes models against age

Description

Posterior medians and 95% credible intervals for a quantity of interest are plotted against year of age.

Usage

## S3 method for class 'disbayes_hier'
plot(x, variable = "cf", ci = FALSE, ...)

Arguments

x

Object returned by disbayes_hier

variable

Name of the variable of interest to plot against age, by default case fatality rates.

ci

Show 95% credible intervals with ribbons.

...

Other arguments. Currently unused

Value

A ggplot2 object that can be printed to show the plot, or customised by adding geoms.

Better plots can be drawn by tidying the object returned by disbayes, and using ggplot2 directly on the tidy data frame that this produces. See the vignette for examples.


disbayes documentation built on Sept. 10, 2023, 1:08 a.m.