Learn R Programming

EpiNow2 (version 1.3.2)

create_clean_reported_cases: Create Clean Reported Cases

Description

Cleans a data frame of reported cases by replacing missing dates with 0 cases and applies an optional threshold at which point 0 cases are replaced with a moving average of observed cases. See zero_threshold for details.

Usage

create_clean_reported_cases(reported_cases, horizon, zero_threshold = 50)

Arguments

reported_cases

A data frame of confirmed cases (confirm) by date (date). confirm must be integer and date must be in date format.

horizon

Numeric, defaults to 7. Number of days into the future to forecast.

zero_threshold

Numeric defaults to 50. Indicates if detected zero cases are meaningful by using a threshold of 50 cases on average over the last 7 days. If the average is above this thresold then the zero is replaced with the

Value

A cleaned data frame of reported cases