# QQ plot of sigma2 from an MCMC regression?

I've been using R's lm to do some linear regression, but decided to give MCMCregress a try to get a feel for how it works. As expected, I got basically the same coefficients, but the extra sigma2 value puzzles me.

When I do a qqmath plot of the coefficients, I get the following graph, and I'm puzzled by the sigma2 plot. It's obviously not linear, but I'm not sure if that's meaningful in this context. I assume it's sigma squared, and when I took the square root and plotted it, the line was straighter, but still curved.

I guess my question boils down to: what is sigma2 telling me about the MCMC regression fit, and is a graph of it useful or should I ignore the graph and focus on something else? (All of the diagnostics and graphs I've done on my original lm fit seem to indicate that the fit is good, so I'm also wondering if the MCMC regression gives me more information or not.)

(If I need to provide the actual data, I can. I'm hoping that an answer depends more on what sigma2 is rather than on specific values.)

From the documentation for qqmath it seems that the default behavior is to compare the empirical quantiles to those of a normal distribution. So what the QQ plot for $\sigma^2$ (which is the error variance) is telling you is that its marginal posterior distribution is not normal, which you would fully expect. So it's not really informative or meaningful.

The remaining panels are telling you that the marginal posterior distributions of the regression coefficients are basically normal, perhaps with slightly heavier tails because they are marginalized over $\sigma^2$.

The MCMC regression does give you more information in that you have a full posterior distribution over all the parameters, so you can answer questions like "Given the data I've seen and my prior information, what is the probability that the tempwarmer coefficient is positve". You can also look at joint distributions of two or more parameters, or functions of the coefficients, and on and on.

I should mention that these QQ plots aren't really giving you an indication of goodness of fit. For that you would want to look at some other measures - posterior predictive distributions, for example, or MCMCregress may be able to do formal Bayesian model comparisons for you too. I'm not familiar with that particular function but a cursory Googling turned up some potential leads.

All that said, if the lm() fit is good I wouldn't loose much sleep over it. But I would most wholeheartedly encourage any forays into Bayesian analysis :)

• Thanks! I suspected something like this, based on diagnostics for the (similar) lm fit. I'm trying to get my head around MCMC and Bayesian methods and sometimes think I am, then sometimes everything looks trivial, then... I'll pursue what you've said about the full posterior distribution to see where that leads. – Wayne May 26 '11 at 20:36
• Glad to help. If you're in the market for a reference Gelman and Hill's book Data Analysis Using Regression and Multilevel/Hierarchical Models is a very accessible book to get started, with a lot of practical advice. And it doesn't cost your firstborn child either... – JMS May 26 '11 at 23:10
• Good recommendation. I did get that book, but it's interesting how my learning works at this point: I'll go through a book, highlighting and understanding key points, but not getting the bigger picture so I can't really "make it work". Then I move on to another book, another topic, and finally come back around and suddenly it's understandable. Sure enough, I'd highlighted all the right things but somehow it hadn't clicked. Perhaps this time around it will. – Wayne May 27 '11 at 4:13