Impute a leading ovulation anchor before a participant's first recorded menses onset
Source:R/impute_leading_ovulation.R
impute_leading_ovulation_anchors.RdDays observed BEFORE a participant's first recorded menses onset (the left-censored
start of participation) have no cycle anchor on their left, so PACTS cannot place them:
the luteal phase they belong to has a closing menses (the first onset) but no ovulation.
This opt-in rule imputes that missing ovulation with the same population-average
backward count the package already uses inside observed cycles: ovulation is placed
luteal_days days (default 15) before the first menses onset, so the leading days scale
as the end of a luteal phase in cyclic_time_impute / cyclic_time_imp_ov (never in
the confirmed-only columns). The anchor is marked in a new column
ovtoday_leading_impute (1 on the imputed day, 0 elsewhere). If the imputed day lies
before the first observed row, a blank row is added on that date (other columns NA),
exactly as impute_next_menses_onsets() adds a blank row for an imputed onset.
Arguments
- data, id, date, menses, ovtoday
As in
pacts_scaling().- luteal_days
Integer; days before the first menses onset at which the ovulation is placed. Default 15 (the package's backward-count convention).