nowcast_tests: Nowcast

Description Usage Arguments

View source: R/nowcast.R View source: R/model.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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


jesse-smith/covidModel documentation built on Feb. 21, 2022, 3:23 p.m.