Some of these code projects are available on github as well: https://github.com/rmcelreath

  • rethinking R package, used in my Bayesian statistics course. Last updated 24-JUN-2016 to version 1.59. User manual: PDFAs of version 1.48, you need RStan before you can install rethinking. So you will also want to install RStan first. Go to mc-stan.org and follow the instructions for your platform. The quick start guide is probably the best place to start. The hardest part is getting a C++ compiler installed. Then you can install the rethinking package from source by using the following lines of R code (RStudio may cause problems, so try outside of RStudio):
    install.packages(c('coda','mvtnorm','loo'))
    options(repos=c(getOption('repos'), rethinking='http://xcelab.net/R'))
    install.packages('rethinking',type='source')

    You can also install from github, using devtools:

    install.packages(c('devtools','coda','mvtnorm','loo'))
    library(devtools)
    install_github("rmcelreath/rethinking")
  • glmer2stan R package. Much of this package has been superseded by the rethinking package above, which can do just about everything glmer2stan can do and more. Last updated 24-FEB-2014 to version 0.995. This package provides a function, glmer2stan, to build a Stan model from a glmer/glm formula or list of formulas. Available model families are "gaussian", "binomial", "poisson", "gamma", "ordered" (ordered logit), as well as any combinations of these. Computes DIC and WAIC. See the GitHub repository (glmer2stan) for some sketchy documentation and examples. You can install the glmer2stan package from source by using the following two lines of R code:
options(repos=c(getOption('repos'), glmer2stan='http://xcelab.net/R'))
install.packages('glmer2stan',type='source')
  • Baryplot - An R package for plotting those triangular game theoretic diagrams.
  • Gameweb - A bundle of code for running multi-user experiments, with process-tracing. Based on Mouselab Web. It takes a little effort to install this beast, but everyone is welcome to the code and existing experiments. So just contact me, if you'd like it. It uses PHP and MySQL for the server. Clients are just web browsers. I also have a bundle of R code for analyzing the process tracing data the experiments produce.