plot_risk_uncertainty: Function for plotting risk and uncertainty of case escaping...

View source: R/plot_risk.R

plot_risk_uncertaintyR Documentation

Function for plotting risk and uncertainty of case escaping active monitoring

Description

Function for plotting risk and uncertainty of case escaping active monitoring

Usage

plot_risk_uncertainty(
  pstr_data,
  dist = c("gamma", "lnorm", "weibull"),
  nsamp = 1000,
  u = runif(nsamp, 1, 14),
  phi = c(1e-04, 0.001, 0.01),
  durations = 5:25,
  ci_width = 0.9,
  yrange = NULL,
  include_xlab = TRUE,
  include_legend = TRUE,
  output_plot = TRUE,
  return_data = FALSE,
  return_plot = FALSE
)

Arguments

pstr_data

a data object with posterior distributions of gamma parameters (must have shape and scale column)

dist

character string specifying the parametric distribution of pstr_data, defaults to gamma

nsamp

number of samples from posterior distribution upon which to base calculations

u

numeric value or vector of assumed duration(s) of time between exposure and monitoring

phi

probability a case becomes symptomatic

durations

durations of active monitoring to plot

ci_width

numeric value between 0 and 1 indicating the nominal value for the eventually computed and displayed CI

yrange

if not NULL, a vector of the ylim to plot

include_xlab

logical, whether to include an x-axis label

include_legend

logical, whether to include a legend

output_plot

logical, whether or not to automatically output the plot

return_data

logical, whether or not to return the data used for plotting

return_plot

logical, whether or not to return the plotted grob

Value

if return_plot is specified, it returns the grob

Examples

plot_risk_uncertainty(ebola_gamma_pstr)

reichlab/activemonitr documentation built on April 9, 2024, 2:17 p.m.