Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R_t cannot be inferred using the PyMC3 implementation of the generative model #63

Open
dimarkov opened this issue May 22, 2020 · 0 comments

Comments

@dimarkov
Copy link

dimarkov commented May 22, 2020

Hi, thanks for making this work public, it is super informative and helpful.

I would like to point out to that the PyMC3 example cannot recover R_t, as the gamma is not identifiable parameter. Changing the prior parameters for gamma also changes the estimates of R_t.

The reason for this is as currently defined, gamma has no influence on \theta and hence observation likelihood. In other words, the prior over gamma and the posterior will be identical. A fix would be to define random walk directly for R_t, for example

R_t = R_{t-1} + \sigma n_t

and then map this value to theta_t,

\theta_t = \gamma * (R_t - 1)

this way the likelihood becomes actual function of \gamma, and R_t, and both gamma and R_t are identifiable.

Alternatively, if you are worried about the negative values for R_t, one can constrain R_t to positive values with either softplus or exponential transform, e.g.

x_t = x_{t-1} + \sigma n_t
R_t = f(x_t)

@dimarkov dimarkov changed the title Mistake in the implementation of the generative model in PyMC3 R_t cannot be inferred using the PyMC3 implementation of the generative model May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant