Inuition behind response rate (rho) in epidemiological models

The transition function in the case of a Simple SIR model is defined as:

    def transition(self, params, state, t):
        R0, tau, rho = params

        # Sample flows between compartments.
        S2I = pyro.sample("S2I_{}".format(t),
                          infection_dist(individual_rate=R0 / tau,
                                         num_susceptible=state["S"],
                                         num_infectious=state["I"],
                                         population=self.population))
        I2R = pyro.sample("I2R_{}".format(t),
                          binomial_dist(state["I"], 1 / tau))

        # Update compartments with flows.
        state["S"] = state["S"] - S2I
        state["I"] = state["I"] + S2I - I2R

        # Condition on observations.
        t_is_observed = isinstance(t, slice) or t < self.duration
        pyro.sample("obs_{}".format(t),
                    binomial_dist(S2I, rho),
                    obs=self.data[t] if t_is_observed else None)

Would I be correct in my hypothesis that rho is used to represent the fact that the reported data is different from the true underlying distribution of the compartments due to limited testing?

Hey, I am very new to Pyro. And still a bit confused about this.
Another thing was the pyro restricts the “compartmental” distributions available to binomial, beta binomial and a couple of others. Does this mean that I cannot use a Lognormal likelihood?

@fritzo I see that you have majorly contributed to the compartmental models in pyro.
Could you please help me get a better understanding of the implementation?

ping

yes rho is the response rate = 1 - false negative rate

1 Like

Hi @rsarky, sorry for the slow response, I’ve been busy moving across the US and only just settled today.

Does this mean that I cannot use a Lognormal likelihood?

That’s correct, Pyro’s contrib.epidemiology allows only discrete valued observations (even though some inference algorithms relax to a continuous approximation under the hood). However you can use overdispersed distributions binomial_dist(..., overdispersion=...) and beta_binomial_dist(..., overdispersion=od) which behave approximately like LogNormal distributions for high overdispersion See the binomial_dist() docs and this derivation notebook. We also have a Pyro slack with an epidemiology channel; ping me your email if you’d like to join.

Thanks for trying our pyro.contrib.epidemiology!

1 Like

Yes, this is what I thought to be the case. Thanks for confirming!