forecast_n_strain | R Documentation |
Forecast for a single model and summarise
forecast_n_strain(
data,
model = NULL,
inits = forecast.vocs::fv_inits,
fit = forecast.vocs::fv_sample,
posterior = forecast.vocs::fv_tidy_posterior,
extract_forecast = forecast.vocs::fv_extract_forecast,
strains = 2,
voc_label = "VOC",
probs = c(0.05, 0.2, 0.8, 0.95),
digits = 3,
scale_r = 1,
timespan = 7,
...
)
data |
A list of data as produced by |
model |
A |
inits |
A function that returns a function to samples initial
conditions with the same arguments as |
fit |
A function that fits the supplied model with the same arguments
and return values as |
posterior |
A function that summarises the output from the supplied
fitting function with the same arguments and return values (depending on
the requirement for downstream package functionality to function) as
|
extract_forecast |
A function that extracts the forecast from
the summarised |
strains |
Integer number of strains. Defaults to 2. Current maximum is 2. |
voc_label |
A character string, default to "VOC". Defines the label to assign to variant of concern specific parameters. Example usage is to rename parameters to use variant specific terminology. |
probs |
A vector of numeric probabilities to produce
quantile summaries for. By default these are the 5%, 20%, 80%,
and 95% quantiles which are also the minimum set required for
plotting functions to work (such as |
digits |
Numeric, defaults to 3. Number of digits to round summary statistics to. |
scale_r |
Numeric, defaults to 1. Rescale the timespan over which the growth rate and reproduction number is calculated. An example use case is rescaling the growth rate from weekly to be scaled by the mean of the generation time (for COVID-19 for example this would be 5.5 / 7. |
timespan |
Integer, defaults to 7. Indicates the number of days between each observation. Defaults to a week. |
... |
Additional parameters passed to |
Functions used for forecasting across models, dates, and scenarios
forecast_across_dates()
,
forecast_across_scenarios()
,
forecast()
,
plot.fv_forecast()
,
summary.fv_forecast()
,
unnest_posterior()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.