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
Arguments
- .disease_data
A
data.frameof cases as exported bypreprocess_for_nowcast()- date
The name of the date column in
.disease_datato be used for the temporal effects- temporal_effects
A
temporal_effectsobject codifying the temporal effects to be used.
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))
