After reading @twiecki’s blogpost on hierarchical bayesian models(Why hierarchical models are awesome, tricky, and Bayesian — While My MCMC Gently Samples), and experiencing failing chain issues with very small values of the priors in an inference, I want to reparametrize my model.
As described in the above article, one can simply shift the normal distribution like so:
a_offset = pm.Normal('a_offset', mu=0, sd=1, shape=n_counties)
a = pm.Deterministic("a", mu_a + a_offset * sigma_a)
How would this be done for a log-normal distribution?