Skip to contents

This function extracts metadata from the provided dataset to be used in the observation model.

Usage

extract_obs_metadata(new_confirm, observation_indicator = NULL)

Arguments

new_confirm

A data.table containing the columns: "reference_date", "delay", ".group", "new_confirm", and "max_obs_delay". As produced by enw_preprocess_data() in the new_confirm output with the addition of the "max_obs_delay" column as produced by add_max_observed_delay().

observation_indicator

A character string specifying the column name in new_confirm that indicates whether an observation is observed or not. This column should be a logical vector. If NULL (default), all observations are considered observed.

Value

A list containing:

  • st: time index of each snapshot (snapshot time).

  • ts: snapshot index by time and group.

  • sl: number of reported observations per snapshot (snapshot length).

  • csl: cumulative version of sl.

  • lsl: number of consecutive reported observations per snapshot accounting for missing data.

  • clsl: cumulative version of lsl.

  • nsl: number of observed observations per snapshot (snapshot length).

  • cnsl: cumulative version of nsl.

  • sg: group index of each snapshot (snapshot group).