Description Usage Arguments Details Value Examples
Plot a SEIR model projection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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? |
See project_seir()
for an example.
A ggplot object
1 | # See ?project_seir
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.