Skip to content
Snippets Groups Projects
plot.seiqhrf.Rd 2.24 KiB
Newer Older
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIN_plot.R
\name{plot.seiqhrf}
\alias{plot.seiqhrf}
\title{Plot simulation result}
\usage{
\method{plot}{seiqhrf}(
  x,
  method = NULL,
  comp_remove = "none",
  time_limit = 90,
Christina Azodi's avatar
Christina Azodi committed
  ci = TRUE,
  sep_compartments = FALSE,
  trans = FALSE,
  known = NULL,
  start_date = ymd("2020-03-21"),
  show_start_date = FALSE,
  return_df = TRUE,
  market.share = 0.04,
  icu_percent = 0.1,
  total_population = NULL,
  ...
)
}
\arguments{
\item{x}{An seiqhrf object returned from function \code{\link{seiqhrf}}.}

\item{method}{If "times", plot Duration frequency distributions.
If "weekly_local", plot local weekly estimates from simulation.
If NULL, plot sirplus plots.}

\item{comp_remove}{Compartments to remove. Suggest c(s.num, r.num)}

\item{time_limit}{Number of steps (days) to plot.}
Christina Azodi's avatar
Christina Azodi committed
\item{ci}{T/F to include 95\% confidence intervals in sirplus plot.}
Christina Azodi's avatar
Christina Azodi committed
\item{sep_compartments}{T/F use faceting to show each compartment in a 
separate plot, only works if plotting a single simulation.}

\item{trans}{Y-axis transformation (e.g. log2, log10). Default = none.}

\item{known}{Dataframe with known compartment numbers to plot alongside
projections}

\item{start_date}{Date for day 0. Default: ymd("2020-03-21"),}

\item{show_start_date}{First date to show in plots. Use ymd format. If FALSE,
shows from step 1. Default: FALSE}

\item{x_axis}{Title for x-axis. Default: 'Date (MM-DD)'}
\item{plot_title}{Title for whole plot. Default: ''}
\item{return_df}{In effect only when method == "weekly", if TRUE returns 
also the dataframe used for plotting as well as the ggplot object.}

\item{market.share}{between 0 and 1, percentage of local hospital beds in 
the simulated unit (e.g. state)}

\item{icu_percent}{between 0 and 1, percentage of patients that should go to 
ICU among the ones that need hospitalization}

\item{sim_population}{Size of population simulated. Only needed if providing 
`total_population`.}

\item{total_population}{True population size, needed only if simulation size 
is smaller than the true population size due to computational cost 
etc.}

\item{...}{Additional parameters}
}
\description{
Plot simulation result