ringbp icon indicating copy to clipboard operation
ringbp copied to clipboard

Comment does not match code in `outbreak_setup()`

Open joshwlambert opened this issue 9 months ago • 3 comments

The comment on L47 of outbreak_setup() states:

# set isolation time for cluster to minimum time of onset of symptoms + draw from delay distribution

however, the code on L48 does not use the minimum time, instead it uses the vector of onset times.

joshwlambert avatar May 02 '25 15:05 joshwlambert

Revisiting the methods in paper:

We initialised the branching process with five, 20, or 40 cases to represent a newly detected outbreak of varying size. Initial symptomatic cases were then isolated after symptom onset with a delay drawn from the onset-to-isolation distribution ...

Rewinding the repo to look at the (second) submission state, no changes to this element.

Conceptually, the pmin version here would correspond to:

  • the new case cluster all derives from a single exposure event (compatible with giving them all the same exposure time)
  • they are all known as exposed somehow (inconsistent with subsequent tracing etc governed by input parameters)
  • but there's no acting on that exposure until the first of them shows symptoms

That ...doesn't seem like a reasonable initial condition, especially when the analysis explores varying initial infections independently of natural history parameters. The transmission chains are also non-interacting, so to me it seems like the initial size is more about ensuring that one doesn't observe stochastic burnout, not some notion of the initial cases actually representing a cluster.

I recommend replace the comment, instead indicating that the intent is simply to have an initial set of independent cases.

My guess is that having a distribution in isolation times should make increasing the number of initial cases more reliably preclude early burnout (when statistically unlikely)

pearsonca avatar May 09 '25 10:05 pearsonca

Thanks for looking into this and for the detailed description @pearsonca.

Would you mind explaining what you mean by:

they are all known as exposed somehow

I'm not sure I understand as, all initial cases are missed and a proportion are asymptomatic, thus unknown to the surveillance system until symptom onset.

joshwlambert avatar May 14 '25 11:05 joshwlambert

Sure; i mean that giving them all the same isolation time could represent that they had some known exposing incident (which definitionally as you point out, they do not). As in, I know a bunch of people all got exposed at some event - i find that out at some time (via passive detection of one of those people, which is their onset + isolation delay) and then (instaneously) i apply isolation to all the other people in that group.

Seems like a weird assumption, so I'm guessing the comment is wrong and we should just delete it and continue independently sampling them.

pearsonca avatar May 14 '25 14:05 pearsonca

This issue was resolved when PR #173 was merged.

Thanks @pearsonca for spotting the original mistake, the detailed description, and for looking into the version history of the code and corresponding information in the paper.

joshwlambert avatar Dec 03 '25 10:12 joshwlambert