nowcast_tests() predicts the expected number of tests per day through the current date given a linelist of cases with collection and report dates. It uses estimate_delay() to determine the last complete collection date and forecasts from that point. Tests are predicted by a weighted ensemble of two structural time series models with semilocal and robust (Student-t) trends and a square-root link.

nowcast_tests(
  .data,
  .collection_date = "collection_date",
  .report_date = "report_date",
  today = Sys.Date(),
  iterations = ceiling(10000/0.8),
  burn = 0.2
)

nowcast_tests(
  .data,
  .collection_date = "collection_date",
  .report_date = "report_date",
  today = Sys.Date(),
  iterations = ceiling(10000/0.8),
  burn = 0.2
)

Arguments

.data

A linelist of incident cases/tests as a data frame

.collection_date

A Date column containing the test date

.report_date

A Date column containing the report date

today

The date to consider "today"

iterations

The number of MCMC iterations for each model in the ensemble; the total number of iterations will be twice this amount.

burn

The percentage of initial iterations to discard for each model