Question about compartmental models in Pyro

I noticed that the transition rates between the compartments is not represented as differential equations but by distributions.
Why is this?
How does it compare to transition rates being rerpresented as differential equations?
Is there a sample implementation of that case?

Further I am trying to model the effect of external interventions on the transmission rate. Any tips/resources on the same?

Hi @rsarky,
pyro.contrib.epidemiology focuses on discrete-state discrete-time stochastic models. You might be interested in the original design doc where we discussed design decisions. In particular we were interested in fine-grained modeling of small numbers of infections or fine partitioning of a population into regions or segments each containing few infections; in these settings discrete-state stochastic models are more accurate than differential equations. We decided on discrete time rather than continuous time because Pyro has lots of fancy tools for discrete time models.

You can model interventions on say transmission rates by controlling the R0 parameter rather than inferring it. I think the closest example is where we define a piecewise response rate in the HeterogeneousSIRModel.