Should I allow all summaries to be used in inference? #721
-
Hi, I'm a statistics student in the UK currently on a Biostatistics internship. I've been using the sbi package regularly, and find it incredibly helpful. I have a query within my own personal use case of sbi. I'm using sbi for epidemic modelling, where I use a summary statistic which contains the times at which the people recover/die (after being infected) as well as the total duration of the epidemic. Since my epidemic simulator is stochastic, quite often I end up with only one person recovering (the person who I set to be the initial infected). With epidemic data, my observed data is never really going to be just one person catching the disease. Therefore, should I force my simulator to only simulate epidemics with a minimum number of infections, or is this a bad idea? Obviously in real life this one initial infection may just recover and not infect any one else, but it seems like a waste of computing or at least counterintuitive to have a load of these single person infection summaries. Any help is appreciated and thanks again for developing a great package. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @joepiekos ! I'm very sorry for not replying sooner! Apparantly one does not receive email notification when a discussion topic is created, and so I had never seen this message. Apologies! Anyways, there is a good solution for this: to use a def decision_criterion(summary_stats):
return summary_stats[:, 0] > 1.0 Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @joepiekos !
I'm very sorry for not replying sooner! Apparantly one does not receive email notification when a discussion topic is created, and so I had never seen this message. Apologies!
Anyways, there is a good solution for this: to use a
RestrictionEstimator
. The restriction estimator will restrict the prior to regions which satisfy a given criterion (in your case: more than 1 person that caugt the disease). There is a tutorial here. This tutorial is specific to regions which produceNaN
, but you can adapt it to anydecision_criterion
to theRestrictionEstimator
, e.g.Hope this helps!
Michael