Skip to contents

Function to put the data into the format proper to the nowcasting estimation, has to use the maximum of data present on the last week parsed to the estimation. Makes the account of maximum days per week to be used.

Usage

data.w(
  dataset,
  trim.data,
  bins_age = c("SI-PNI", "10 years", "5 years", bins_age),
  date_onset,
  date_report,
  age_col,
  K = 0,
  silent = F
)

Arguments

dataset

dataset to be formatted as data by week

trim.data

How much to trim of the data?

bins_age

Bins of age to cu the data, parsing from nowcasting_inla

date_onset

Column of dates of onset of the events, normally date of onset of first symptoms of cases

date_report

Column of dates of report of the event, normally date of digitation of the notification of cases

age_col

Age column to be where to cut the data into age classes

K

How much weeks to forecast ahead? Default K is 0, no forecasting ahead

Value

Data in weeks format, with the maximum dates for the last week used

Examples