# Residual diagnostics in MCMC -based regression models

I've recently embarked on fitting regression mixed models in the Bayesian framework, using a MCMC algorithm (function MCMCglmm in R actually).

I believe I have understood how to diagnose convergence of the estimation process (trace, geweke plot, autocorrelation, posterior distribution...).

One of the thing that strikes me in the Bayesian framework is that much effort seems to devoted to do those diagnostics, whereas very little appears to be done in terms of checking the residuals of the fitted model. For instance in MCMCglmm the residual.mcmc() function does exist but is actually not yet implemented (ie.returns: "residuals not yet implemented for MCMCglmm objects"; same story for predict.mcmc()). It seems to be lacking from other packages too, and more generally is little discussed in the literature I've found (apart from DIC which is quite heavily discussed too).

Could anyone point me to some useful references, and ideally R code I could play with or modify?

Many thanks.

-
Great question. I really like Andrew Gelman's paper with Cosma Shalizi about Bayesian model checking. – David J. Harris Sep 5 '13 at 18:32

Regression in Bayesian and exact frequentist procedures is a way of estimating the conditional mean $\mbox{E}[Y|X]$, usually described by a set of model parameters. I am using the conditional mean to refer to fitted values. In frequentist statistics, there is a concept of repeated experiments, although we conceive of the sample size and distribution of $X$ as being fixed whereas $Y$ is random and subject to replications through repeated experimentation. That's the frequentist interpretation of probability. That's why residuals have properties of random variables, notably a density function. – AdamO Sep 6 '13 at 21:55