Converts date-based or numeric delay data into an aggregated format suitable for the primarycensored Stan model. Handles date-to-numeric conversion, computation of derived columns, an obs-time-to-Inf heuristic, and aggregation by unique delay/censoring combinations.
Arguments
- data
A data frame with date columns (
pdate_lwr,sdate_lwr, and optionallypdate_upr,sdate_upr,obs_date,n).- obs_time_threshold
Numeric multiplier for the obs-time-to-Inf heuristic. Observations where
relative_obs_time > max(delay_upr) * obs_time_thresholdare treated as untruncated. Set toInfto disable.- verbose
Logical, print progress messages?
