Community,

I am aware that this post is similar to the earlier one at Composing Stan models (posterior as next prior).

I’m wondering if there has been any insight gained on this issue. PyMC3 has a page on “Updating Priors” which deals with this:

https://docs.pymc.io/pymc-examples/examples/pymc3_howto/updating_priors.html

Could something like this be possible with STAN?

The linked PyMC3 doc appears to place independent univariate priors on the downstream model using the *margins* of the posterior from the upstream model. This is easy to do in Stan, and @bgoodri’s suggestion from the post you linked above might be an ok way to achieve this. However, it is not true in general that the margins of the posterior do a good job of capturing the shape of the posterior. This is an example of the “hemorrhaging of information” that @betanalpha describes in the post you linked above.

I think that linked PyMC3 vignette is being a bit imprecise with its language. For example, where it says “# Priors are posteriors from previous iteration”, the more precise thing to say would be that the joint prior is the unique multivariate distribution for which all elements are independent and all margins correspond to the margins of the posterior. Formally, there aren’t multiple priors but rather one joint prior, and there aren’t multiple posteriors but rather one joint posterior. And this method of translating the posterior to a joint prior is not guaranteed to yield a joint prior that much resembles the joint posterior. With that said, this might well be better than nothing (but I’m not sure even that is necessarily guaranteed).

4 Likes