rt_opts | R Documentation |
Defines a list specifying the optional arguments for the time-varying reproduction number. Custom settings can be supplied which override the defaults.
rt_opts(
prior = list(mean = 1, sd = 1),
use_rt = TRUE,
rw = 0,
use_breakpoints = TRUE,
future = "latest",
gp_on = c("R_t-1", "R0"),
pop = 0
)
prior |
List containing named numeric elements "mean" and "sd". The mean and standard deviation of the log normal Rt prior. Defaults to mean of 1 and standard deviation of 1. |
use_rt |
Logical, defaults to |
rw |
Numeric step size of the random walk, defaults to 0. To specify a
weekly random walk set |
use_breakpoints |
Logical, defaults to |
future |
A character string or integer. This argument indicates how to set future Rt values. Supported options are to project using the Rt model ("project"), to use the latest estimate based on partial data ("latest"), to use the latest estimate based on data that is over 50% complete ("estimate"). If an integer is supplied then the Rt estimate from this many days into the future (or past if negative) past will be used forwards in time. |
gp_on |
Character string, defaulting to "R_t-1". Indicates how the Gaussian process, if in use, should be applied to Rt. Currently supported options are applying the Gaussian process to the last estimated Rt (i.e Rt = Rt-1 * GP), and applying the Gaussian process to a global mean (i.e Rt = R0 * GP). Both should produced comparable results when data is not sparse but the method relying on a global mean will revert to this for real time estimates, which may not be desirable. |
pop |
Integer, defaults to 0. Susceptible population initially present. Used to adjust Rt estimates when otherwise fixed based on the proportion of the population that is susceptible. When set to 0 no population adjustment is done. |
An <rt_opts>
object with settings defining the time-varying
reproduction number.
# default settings
rt_opts()
# add a custom length scale
rt_opts(prior = list(mean = 2, sd = 1))
# add a weekly random walk
rt_opts(rw = 7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.