plot_projection.Rd
Plot a SEIR model projection
plot_projection( pred_dat, obs_dat, col = "#377EB8", value_column = "value", date_column = "day", ylab = "Reported cases", Rt = NULL ) plot_residuals( pred_dat, obs_dat, obj, value_column = "value", date_column = "day", type = c("raw", "quantile"), ylab = if (type == "raw") "Residual" else "Quantile residual", date_function = lubridate::ymd, return_residuals = FALSE )
pred_dat | Output from |
---|---|
obs_dat | A data frame of observed data. Should have a column of |
col | Colour for the line and ribbon. |
value_column | Column in |
date_column | Date or day column name. A column by this name must be in
|
ylab | Y axis label. |
Rt | An optional vector of Rt values to colour the plot by. |
obj | Outut from |
type | Raw (observed - expected) or quantile residuals ( |
date_function | A function to translate the character representation of |
return_residuals | Return residuals instead of plot? |
A ggplot object
See project_seir()
for an example.
# See ?project_seir