A family of functions used for inputting data into Covidestim.

input_cases(data, type = "reported", lastCaseDate = NULL)

input_deaths(data, type = "reported", lastDeathDate = NULL)

input_vaccines(data, type = "reported")

Arguments

data

A data.frame as described below.

type

A string, either "reported" or "occurred".

"reported" applies to the following situations:

  • Case or death data where the count for a particular day represents the number of cases or deaths that were reported publicly on that day (for example, as of June 1st, 2020, this is the type of data reported by the New York Times' covid-19-data repository, and by the Covid Tracking Project.

  • Cases or deaths data where the count for a particular day is the number of cases or deaths received from hospital reports, or diagnostic laboratories, accumulated across a particular region

"occurred" applies to the following situations:

  • Data where counts represent the number of cases or deaths that actually occured on that day. For case data, this would be the day a test was administered. For deaths, this would be the day an individual died. Note that, if the deaths data represent the day an individual's death was first reported as a SARS-Cov-2-related death, that data should be passed with type = "reported", instead.

Details

There are two types of observational data that can be used with Covidestim:

  • Case data, detailing the number of new cases each day

  • Death data, detailing the number of confirmed Covid-19 deaths each day

All input data to Covidestim is expected to be a data.frame of two variables. One variable, date, must be a vector of type POSIXct or Date. The second column, observations, must be a non-negative numeric vector.

Missing values in cases and deaths data should be imputed before running the model. The date range of all sets of data passed to covidestim must be equivalent, with one observation each day, and no gaps in the data. Assertions attempt to enforce this specification.