Bayes fits the data less closely than maximum likelihood

Lluis Bermudez writes:

I’m from University of Barcelona and I’ve using “arm” package to obtain posterior estimates of glm parameters. I usually worked with “glm” function, but I need more than a point estimation. The problem is that when using “bayesglm” function, I don’t get the same results as with “glm” funtions. Actually, I’ve found differences with dispersion parameter estimates.

Yu-Sung took a look, and it turned out that what was happening was just what you’d expect–although we didn’t actually think about it until we’d received this email. Lluis’s example had a sparse enough data structure that the weak default prior distribution in bayesglm made a difference in the coefficient estimates. As a result, the Bayesian estimates didn’t quite fit the data as well. That’s fine–we don’t want to overfit!–and it’s good for us to understand what’s going on.