Tutorials in Quantitative Methods for Psychology (Oct 2016)

Bayesian linear mixed models using Stan: A tutorial for psychologists, linguists, and cognitive scientists

  • Sorensen, Tanner,
  • Hohenstein, Sven,
  • Vasishth, Shravan

DOI
https://doi.org/10.20982/tqmp.12.3.p175
Journal volume & issue
Vol. 12, no. 3
pp. 175 – 200

Abstract

Read online

With the arrival of the R packages \fontencoding {T1}\texttt {nlme} and \fontencoding {T1}\texttt {lme4}, linear mixed models (LMMs) have come to be widely used in experimentally-driven areas like psychology, linguistics, and cognitive science. This tutorial provides a practical introduction to fitting LMMs in a Bayesian framework using the probabilistic programming language Stan. We choose Stan (rather than WinBUGS or JAGS) because it provides an elegant and scalable framework for fitting models in most of the standard applications of LMMs. We ease the reader into fitting increasingly complex LMMs, using a two-condition repeated measures self-paced reading study.

Keywords