maxbiostat / R0_uncertainty

Some remarks on prior modelling for the basic reproductive number in the Susceptible-Infected-Recovered (SIR) epidemic model
6 stars 2 forks source link

Decide how randomness will be added to the deterministic model #16

Open marciomacielbastos opened 5 years ago

marciomacielbastos commented 5 years ago

Randomness must maintain the model representative of an actual epidemic.

fccoelho commented 3 years ago

Here we can go to a stochastic SIR model or just add lognormal noise like so:

y = odeint(SIR, t=times, y0=[0.99, 0.01], args=((beta, gamma),), rtol=1e-8)
# Simulando dados  Assumindo uma distribuição log-normal com média igual às séries simuladas
yobs = np.random.lognormal(mean=np.log(y[1::]), sigma=[0.2, 0.3])
maxbiostat commented 3 years ago

I like the log normal alternative. It's simpler and is in line with the literature. Moreover, we would then have a correctly specified error model. Using a stochastic SIR would be nice as an extra, to try and study what happens when the error model is misspecified.

fccoelho commented 3 years ago

There's a slight problem with this: image

os valores da distribuição lognormal extrapolam o limite superior do domínio do modelo (0,1) we'd have to truncate it

maxbiostat commented 3 years ago

One way to combat this is to generate a truncated log normal directly, instead of truncating post facto.