| plot_estimates | R Documentation |
Allows users to plot the output from estimate_infections() easily.
In future releases it may be depreciated in favour of increasing the
functionality of the S3 plot methods.
plot_estimates(
estimate,
reported,
ylab,
hline,
obs_as_col = TRUE,
max_plot = 10,
estimate_type = c("Estimate", "Estimate based on partial data", "Forecast"),
style = c("ribbon", "linerange")
)
estimate |
A |
reported |
A |
ylab |
Character string. Title for the plot y axis. |
hline |
Numeric, if supplied gives the horizontal intercept for a indicator line. |
obs_as_col |
Logical, defaults to |
max_plot |
Numeric, defaults to 10. A multiplicative upper bound on the\ number of cases shown on the plot. Based on the maximum number of reported cases. |
estimate_type |
Character vector indicating the type of data to plot. Default to all types with supported options being: "Estimate", "Estimate based on partial data", and "Forecast". |
style |
Character string indicating the plot style for credible intervals. Options are "ribbon" (default) for shaded ribbon plots or "linerange" for error bars. Error bars can be clearer for weekly or aggregated data. |
A ggplot2 object
# get example model results
out <- readRDS(system.file(
package = "EpiNow2", "extdata", "example_estimate_infections.rds"
))
# plot Rt estimates
plot_estimates(
estimate = summary(out, type = "parameters", param = "R"),
ylab = "Effective Reproduction No.",
hline = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.