Skip to contents

Prepare and validate incidence data for model fitting

Usage

chlaa_prepare_data(
  data,
  time_col = "time",
  cases_col = "cases",
  expected_step = NULL,
  fill_missing = FALSE
)

Arguments

data

Input data.frame.

time_col

Name of time column.

cases_col

Name of observed case-count column.

expected_step

Optional expected time step. If provided, times must follow this step.

fill_missing

If TRUE and `expected_step` is provided, fill missing time rows with zero cases.

Value

A data.frame with columns `time` and `cases`.