plot.backnow {WhiteLabRt} | R Documentation |
This function plots estimates of case numbers or reproduction numbers (r(t)
) based on the
provided object. It can handle two types of plots: 'est' for estimated case numbers over time,
and 'rt' for estimated reproduction numbers over time.
## S3 method for class 'backnow'
plot(x, plottype, ...)
x |
An object containing the necessary data for plotting. This object should have
specific structure depending on the |
plottype |
A character string specifying the type of plot to generate. Valid options are 'est' for case estimates and 'rt' for reproduction numbers. |
... |
Additional arguments passed to the plot function. |
Depending on the plottype
:
- 'est': Plots the reported cases over time with a polygon representing the
uncertainty interval and a line showing the central estimate.
- 'rt': Plots the reproduction number over time with a similar style.
a plot object for an object of class backnow
data("sample_onset_dates")
data("sample_report_dates")
line_list <- create_linelist(sample_report_dates, sample_onset_dates)
sip <- si(14, 4.29, 1.18)
results <- run_backnow(
line_list,
sip = sip, chains = 1)
plot(results, "est")