BMLR: Bayesian Multiple Linear Regression

The posterior distribution, showing complete distributions of the proportion of variance accounted for (upper left), the standardized regression coefficients (middle row), and the differences of standardized regression coefficients (bottom row).

BMLR: Bayesian Multiple Linear Regression

Software to accompany the article:

Kruschke, J. K., Aguinis, H., & Joo, H. (2012). The time has come: Bayesian methods for data analysis in the organizational sciences.* Organizational Research Methods, 15(4), 722-752. (doi: 10.1177/1094428112457829)

To run the programs, please do the following:

  1. Install R, JAGS, rjags, and RStudio. For complete instructions, please see this blog entry. (You do not need the programs from the book but it harms nothing to get them.) Please also see the additional instructions on that page that are written after the installation steps.
  2. The working programs for Bayesian multiple linear regression can be found in this zip file. Save the zip file on your computer in a place where you would normally save ordinary research data, not in a write-protected folder. Be sure to unzip/extract the files before trying to run them.
  3. In the unzipped/extracted folder BMLR, open the file BMLRexample.R. You can open it in RStudio if you installed RStudio as instructed above. Read the comments in BMLRexample.R, which are preceded by the "#" symbol. Important: Be sure that the working directory is the BMLR folder. In RStudio, you can do this when BLMRexample.R is open in its editing window by clicking menu items Tools -> Set Working Directory -> To Source File Location. You can execute BMLRexample.R by running one line at a time, in order, or by clicking the "run all" or "source" button in RStudio.

• For a more thorough discussion of Bayesian estimation in the context of two-group comparison, please see the article and videos at this web site.

• For a complete tutorial about Bayesian methods, see the book.

*Your click on this link constitutes your request to me for a personal copy of the linked article, and my delivery of a personal copy. Any other use is prohibited.

The model: Likelihood and prior distribution.