Thank you for your response! I have a few clarifying questions. If I understand correctly, the following code
def seir_one_step(st0, et0, it0, beta, gamma, delta):
bt0 = st0 * beta
ct0 = et0 * gamma
dt0 = it0 * delta
st1 = st0 - bt0
et1 = et0 + bt0 - ct0
it1 = it0 + ct0 - dt0
return st1, et1, it1
uses mean value of each B[t], C[t] and D[t] to initialize S, E and I for len(C) time steps. Prior to sampling we specify that C[t] and D[t] have binomial distribution with given observed data. However, we do not specify the distribution of B before the line
trace = pm.sample()
Here are my questions:
- We are not directly using B, C or D to update S, E, I. (the
seir_one_stepuses only mean values.) Then how does the observed data affect values of the parameters? - How does the model know
B[t]has binomial likelihood? And how does it imputeB?