PopulationCounts applies day_of_week_rv across the full padded daily model axis, including the initialization/backprojection period before the first observation. Day-of-week effects are reporting-process effects and should only apply to actual observation/reporting days.
This causes problems in padded MultiSignalModel workflows. In the H+E tutorial model, changing the ED day-of-week effect from fixed truth to a stochastic scaled-Dirichlet random variable causes the PyRenew fit to diverge and produce pathological latent infection trajectories. The same model with fixed day-of-week effects samples normally.
The latent infection trajectory before observation time 0 is an initialization/backprojection device. There are no reported ED observations in that interval, so there should be no ED day-of-week reporting effect there.
Currently, PyRenew treats the day-of-week effect as if it belongs to the shared padded model axis. That conflates two different calendars:
- the latent/model axis, which begins
n_init days before the first observation
- the observation/reporting axis, which begins on
obs_start_date
Day-of-week reporting effects should be aligned to the first observed report date, not to model-axis element 0.
PopulationCountsappliesday_of_week_rvacross the full padded daily model axis, including the initialization/backprojection period before the first observation. Day-of-week effects are reporting-process effects and should only apply to actual observation/reporting days.This causes problems in padded
MultiSignalModelworkflows. In the H+E tutorial model, changing the ED day-of-week effect from fixed truth to a stochastic scaled-Dirichlet random variable causes the PyRenew fit to diverge and produce pathological latent infection trajectories. The same model with fixed day-of-week effects samples normally.The latent infection trajectory before observation time 0 is an initialization/backprojection device. There are no reported ED observations in that interval, so there should be no ED day-of-week reporting effect there.
Currently, PyRenew treats the day-of-week effect as if it belongs to the shared padded model axis. That conflates two different calendars:
n_initdays before the first observationobs_start_dateDay-of-week reporting effects should be aligned to the first observed report date, not to model-axis element 0.