create_shifted_cases | R Documentation |
This functions creates a data frame of reported cases that has been smoothed
using a centred partial rolling average (with a period set by
smoothing_window
) and shifted back in time by some delay. It is used by
estimate_infections
to generate the mean shifted prior on which the back
calculation method (see backcalc_opts()
) is based.
create_shifted_cases(reported_cases, shift, smoothing_window, horizon)
reported_cases |
A data frame of confirmed cases (confirm) by date (date). confirm must be integer and date must be in date format. |
shift |
Numeric, mean delay shift to apply. |
smoothing_window |
Numeric, the rolling average smoothing window to apply. Must be odd in order to be defined as a centred average. |
horizon |
Numeric, defaults to 7. Number of days into the future to forecast. |
A data frame for shifted reported cases
Sam Abbott
create_shifted_cases(example_confirmed, 7, 14, 7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.