extract_obs_metadata: Extract observation metadata

extract_obs_metadataR Documentation

Extract observation metadata

Description

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).

See Also

Helper functions for model modules add_max_observed_delay(), add_pmfs(), convolution_matrix(), enw_reference_by_report(), enw_reps_with_complete_refs(), extract_sparse_matrix(), latest_obs_as_matrix(), simulate_double_censored_pmf()


seabbs/epinowcast documentation built on July 27, 2024, 1:33 p.m.