create_shifted_cases {EpiNow2}R Documentation

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)

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.

Value

A data frame for shifted reported cases

Author(s)

Sam Abbott

Examples

create_shifted_cases(example_confirmed, 7, 14, 7)

[Package EpiNow2 version 1.4.0 Index]