Bayesian Inference, Step 1: Installing JAGS On Your Machine

Common complaint: "Bayesian analysis is too hard! Also, I have kidney stones."
Solution: Make Bayesian analysis accessible and efficient through freeware that anyone can use!

These days, advances in technology, computers, and lithotripsy have made Bayesian analysis easy to implement on any personal computer. All it requires is a couple of programs and a library of scripts to run the actual process of Bayesian inference; all that needs to be supplied by you, the user, is the data you have collected. Conceptually, this is no more difficult then entering in data into SAS or SPSS, and, I would argue, is easier in practice.

This can be done in R, statistical software that can interface with a variety of user-created packages. You can download one such package, JAGS, to do the MCMC sampling for building up distributions of parameter estimates, and then use those parameter estimates to brag to your friends about how you've "Gone Bayes."

All of the software and steps you need to install R, JAGS, and rjags (a program allowing JAGS to talk to R) can be found on John Kruschke's website here. Once you have that, it's simply a matter of entering in your own data, and letting the program do the nitty-gritty for you.




Using R to Do Your Statistics and Crush Your Enemies (Maybe)



Over the course of my checkered career as a graduate student drudge, one of the best resources I have found for learning R, and, more importantly, actually getting it to do useful stuff, is the R guide from the Personality Project over at OSU. I encourage anyone interested in R to check it out, especially since my own experience with R got off to a rocky start; my introductory graduate course in statistics used R, but the instruction was so spotty and the concepts so difficult to understand that one day, instead of calculating a simple t-test like I wanted to, I accidentally ended up bypassing the Pentagon's firewall and starting a countdown for a nuclear warhead to be launched at Zimbabwe, which was stopped remotely at the last second by Edward Snowden.

The point is that R is a powerful language and that, once you become even partially familiar with it, you will be able to carry out basic statistical tests quickly and easily. One of the most instructive sections of the website, for me, is the one on ANOVAs, since I often use this to compare beta weights extracted across different regions of interest and test for double dissociations. Other sections give advice on how to restructure your data to be analyzed in different ways by R, linear regression, and multivariate statistics.

P.S. Some of the examples require links to datasets on the R project website which may no longer be properly linked (e.g., the ANOVA examples use commands like [datafilename = "http://personality-project.org/r/datasets/R.appendix1.data"], but give errors when attempting to read them into a table). I've converted some of them to my personal website, which should make them able to fit into tables without any errors. So, for example, you would use a command like [datafilename=""http://mypage.iu.edu/~ajahn/docs/R.appendix1.data.txt"], and so on for the other datasets.

P.P.S. I was planning to make a short video touring the personality project website and a few of the examples, but I've caught a cold recently, and right now my voice sounds mucusy and gravelly and full of sputum. While it may be pleasing for the ladies to hear my voice like this, it isn't as useful for instructional purposes; and really, that's what I'm all about.