Learn R Programming

EpiNow2 (version 1.8.0)

prepare_truncation_obs: Prepare truncation observations for Stan

Description

Internal function to process a list of observation snapshots into the matrix format required by the truncation Stan model.

Usage

prepare_truncation_obs(data, trunc_max)

Value

A list containing:

  • obs: Matrix of observations (time x datasets)

  • obs_dist: Vector of NA counts per dataset (used to determine truncation)

  • t: Number of time points

  • obs_sets: Number of observation datasets

  • dirty_obs: The processed data.tables (ordered by nrow)

Arguments

data

A list of <data.frame>s each containing date and confirm columns. Each data set should be a snapshot of reported data.

trunc_max

Integer, the maximum truncation delay to consider.