Returns reports with missing reference dates as well as calculating the proportion of reports for a given reference date that were missing.
Arguments
- obs
A
data.frameas produced byenw_add_incidence(). Must contain the following variables:report_date,reference_date,.group, andconfirm, andnew_confirm.
See also
Preprocessing functions
enw_add_delay(),
enw_add_max_reported(),
enw_add_metaobs_features(),
enw_assign_group(),
enw_complete_dates(),
enw_construct_data(),
enw_extend_date(),
enw_filter_delay(),
enw_filter_reference_dates(),
enw_filter_report_dates(),
enw_flag_observed_observations(),
enw_impute_na_observations(),
enw_latest_data(),
enw_metadata(),
enw_metadata_delay(),
enw_preprocess_data(),
enw_reporting_triangle(),
enw_reporting_triangle_to_long()
Examples
obs <- data.frame(
report_date = c("2021-10-01", "2021-10-03"), reference_date = "2021-10-01",
confirm = 1
)
obs <- rbind(
obs,
data.frame(report_date = "2021-10-04", reference_date = NA, confirm = 4)
)
obs <- enw_complete_dates(obs)
obs <- enw_assign_group(obs)
obs <- enw_add_incidence(obs)
enw_missing_reference(obs)
#> Key: <.group, report_date>
#> report_date .group confirm prop_missing
#> <IDat> <num> <num> <num>
#> 1: 2021-10-01 1 0 0
#> 2: 2021-10-02 1 0 NaN
#> 3: 2021-10-03 1 0 NaN
#> 4: 2021-10-04 1 4 1
