Flexible function to generate sirplus plots (i.e. compartment counts over time). This function allows for plotting multiple experiments, viewing the plots of different scales (e.g. log2), plotting compartments separately, adding 95% CIs, and plotting known data along side the simulations.

plot_sirplus(
  x,
  comp_remove,
  time_limit,
  ci,
  sep_compartments,
  trans,
  known,
  start_date,
  x_axis,
  plot_title,
  sim_population,
  total_population,
  ...
)

Arguments

x

A seiqhrf object (or list of multiple seiqhrf objects) returned from seiqhrf.

comp_remove

Compartments to remove. Suggest c(s.num, r.num)

time_limit

Number of steps (days) to plot.

ci

T/F to include 95% confidence intervals in sirplus plot.

sep_compartments

T/F use faceting to show each compartment in a separate plot, only works if plotting a single simulation.

trans

Y-axis transformation (e.g. log2, log10).

known

Dataframe with known compartment numbers to plot alongside projections

start_date

Date for day 0.

x_axis

Title for x-axis.

plot_title

Title for whole plot.

sim_population

Size of population simulated. Only needed if providing `total_population`.

total_population

True population size, needed only if simulation size is smaller than the true population size due to computational cost

...

Additional parameters

Value

ggplot2 object