Check that each (group_var, cohort_var) cohort has a consecutive
dev_var sequence within its observed range. Non-consecutive
cohorts produce non-consecutive age-to-age links downstream (e.g.,
14 -> 17 instead of 14 -> 15), which breaks
summary.ATA() / summary.ED() key uniqueness and causes cartesian
joins in fit_lr().
This function inspects the raw data without modifying it. Use it
before build_triangle() to decide whether to fix the data source, drop
offending cohorts, or pass fill_gaps = TRUE to build_triangle().
Value
A data.table of class "TriangleValidation" with one row
per cohort containing gaps. Columns:
- group_var(s), cohort_var
Cohort identifier.
n_observedNumber of distinct observed
dev_varvalues.n_expectedmax(elap_m) - min(elap_m) + 1for that cohort.missingList column of missing
dev_varvalues.
Returns a zero-row data.table when no gaps are found.
