Skip to contents

Construct a lookup of references dates by report

Usage

enw_reference_by_report(
  missing_reference,
  reps_with_complete_refs,
  metareference,
  max_delay
)

Arguments

missing_reference

missing_reference data.frame output from enw_preprocess_data().

reps_with_complete_refs

A data.frame of report dates with complete (i.e fully reported) reference dates as produced using enw_reps_with_complete_refs().

metareference

metareference data.frame output from enw_preprocess_data().

max_delay

Numeric defaults to 20 and needs to be greater than or equal to 1 and an integer (internally it will be coerced to one using as.integer()). The maximum number of days to include in the delay distribution. Computation scales non-linearly with this setting so consider what maximum makes sense for your data carefully. Note that this is zero indexed and so includes the reference date and max_delay - 1 other days (i.e. a max_delay of 1 corresponds with no delay).

Value

A wide data.frame with each row being a complete report date and' the columns being the observation index for each reporting delay

See also