netsim_scenarios() and step_tmpl_netsim_scenarios() take a single path_to_x, so every replicate of every scenario reinitializes from the same saved state. That state's deviation is common to all replicates, so it is inherited as bias rather than averaged away, and adding replicates does not touch it.
Measured in EpiModel/LA-PrEP-2026 over 45 restart draws: at 250 replicates, restart-driven error in gonorrhea incidence is 8.23% against 0.57% from replication. Spreading the same replicate budget over several restarts is the largest error reduction available and it costs nothing: 8.23% at one restart, 4.12% at four, 2.06% at sixteen.
Today that needs either J separate workflow steps writing into J output directories, or a step_tmpl_map() fan-out. Both work and both are awkward to read back.
Proposed change: let path_to_x take a character vector and cycle it deterministically by batch, so batch b uses path_to_x[(b - 1) %% J + 1].
The determinism is the part that matters. Projects that pair arms under common random numbers need batch b of every scenario to share a restart as well as a seed, or the pairing breaks and every contrast gets noisier. A fixed cycle on the batch index gives that. Anything sampled per scenario does not.
Evidence: plan/calibration-restart-recommendations.md in EpiModel/LA-PrEP-2026.
The diagnostic that would have caught this before the calibration is EpiModel/EpiModelHIV-Template#62.
netsim_scenarios()andstep_tmpl_netsim_scenarios()take a singlepath_to_x, so every replicate of every scenario reinitializes from the same saved state. That state's deviation is common to all replicates, so it is inherited as bias rather than averaged away, and adding replicates does not touch it.Measured in EpiModel/LA-PrEP-2026 over 45 restart draws: at 250 replicates, restart-driven error in gonorrhea incidence is 8.23% against 0.57% from replication. Spreading the same replicate budget over several restarts is the largest error reduction available and it costs nothing: 8.23% at one restart, 4.12% at four, 2.06% at sixteen.
Today that needs either J separate workflow steps writing into J output directories, or a
step_tmpl_map()fan-out. Both work and both are awkward to read back.Proposed change: let
path_to_xtake a character vector and cycle it deterministically by batch, so batch b usespath_to_x[(b - 1) %% J + 1].The determinism is the part that matters. Projects that pair arms under common random numbers need batch b of every scenario to share a restart as well as a seed, or the pairing breaks and every contrast gets noisier. A fixed cycle on the batch index gives that. Anything sampled per scenario does not.
Evidence:
plan/calibration-restart-recommendations.mdin EpiModel/LA-PrEP-2026.The diagnostic that would have caught this before the calibration is EpiModel/EpiModelHIV-Template#62.