TuringModels

StatisticalRethinkingJulia/TuringModels.jl

This site shows the Julia versions of the Bayesian models described in Statistical Rethinking Edition 1 (McElreath, 2016) and 2 (McElreath, 2020). The models are listed at Models.

We have tried our best to let this site be without mistakes. However, if you find a mistake on this website, please let us know. The code for this website is available on GitHub.

  1. Version
  2. Models
    1. 2nd Edition (2020)
    2. 1st Edition (2016)
  3. References

Version

This website is built with Julia 1.7.3 and

CSV 0.10.8
CategoricalArrays 0.10.7
DataFrames 1.4.4
DifferentialEquations 7.6.0
Distributions 0.25.79
Franklin 0.10.51
NodeJS 1.3.0
RData 1.0.0
StatsFuns 1.1.1
StatsPlots 0.15.4
Turing 0.23.1

Models

The models are listed below. Each page aims to contain all the code required to reproduce the results. In other words, it should be possible to get the same output by just copying the code and the accompanying dataset. Furthermore, we try to stick to Julia styling conventions where possible. Therefore, we use unicode symbols in the models. For example, where the book lists alpha, we will use α because the Julia language allows that. As another example, we call DataFrame variables df, which is also the convention in R and Python.

Before you look at the models below, you might want to look at the Basic Example.

2nd Edition (2020)

1st Edition (2016)

References

McElreath, R. (2016). Statistical Rethinking: A Bayesian Course with Examples in R and Stan. CRC press. https://doi.org/10.1201/9781315372495

McElreath, R. (2020). Statistical Rethinking: A Bayesian Course with Examples in R and Stan. CRC press. https://doi.org/10.1201/9780429029608