Learn R Programming

EpiNow2 (version 1.3.4)

create_shifted_cases: Create Delay Shifted Cases

Description

[Stable] 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.

Usage

create_shifted_cases(reported_cases, shift, smoothing_window, horizon)

Value

A data frame for shifted reported cases

Arguments

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.

Author

Sam Abbott

Examples

Run this code
create_shifted_cases(example_confirmed, 7, 14, 7)

Run the code above in your browser using DataLab