Skip to contents

Takes a data.frame as generated by preprocess_for_nowcast() and generates a new data.frame where the time covariates are codified for the model

Usage

preprocess_dates(.disease_data, date, temporal_effects)

Arguments

.disease_data

A data.frame of cases as exported by preprocess_for_nowcast()

date

The name of the date column in .disease_data to be used for the temporal effects

temporal_effects

A temporal_effects object codifying the temporal effects to be used.

Value

A data.frame containing all of the case info

Examples

#Get disease
disease_data <- preprocess_for_nowcast(denguedat, "onset_week", "report_week",
    units = "weeks", now = as.Date("1990-03-05"))
#>  Assuming data is linelist-data where each observation is a test. If you are working with count-data set `data_type = "count"`
date_data    <- preprocess_dates(disease_data, date = "onset_week",
  temporal_effects = temporal_effects(week_of_year = TRUE))