# pymc3: Updating the standard error prior

I am estimating a Bayesian multiple regression using continuous data on both the dependent variable and the regressors. My goal is to iteratively estimate the coefficient distributions as more data becomes available, each time using the posterior distribution of the last estimation as the new prior.

I am using Normal priors for the regressor coefficients and the intercept and a Half Normal prior for sigma (the regression error). I realize that, assuming normal likelihood for the dependent variable, the posteriors for the regression coefficients are Normal as well.

I am using Gaussian kernel density estimation to approximate their posterior distributions and feed them as priors for the next iteration. My question is how I should do this for sigma, given that I don't know the form of its posterior distribution.

If anyone has a suggestion involving a different prior for sigma (e.g. Half Cauchy or Inverse Gamma), that would also be fine.

Thanks in advance!

## 1 Answer

I think if you put an inverse-gamma prior on $$\sigma^2$$ then the posterior distribution of $$\sigma^2$$ will be an inverse-gamma (provided, of course, that you have normal prior on the coefficients). Please see page 54 of Bayesian Core for more details.

HTH

• Sorry, I don't have access to this book, but thanks for the suggestion. I am familiar with the above result for one normally distributed slope coefficient, I was wondering whether it generalizes to many (each with a marginal normal distribution). – Manos Perdikakis Aug 22 '19 at 9:07
• yes, it will generalize because the joint distribution of the coefficients will still be normal. HTH. – asifzuba Aug 28 '19 at 22:07
• sorry, I should have provided some equations so that it would have been more clear. I will do that shortly. thanks! – asifzuba Aug 28 '19 at 22:08