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.6.2 and

CSV 0.9.0
CategoricalArrays 0.10.0
DataFrames 1.2.2
DifferentialEquations 6.19.0
Distributions 0.25.14
Franklin 0.10.51
NodeJS 1.3.0
RData 0.8.3
StatsFuns 0.9.9
StatsPlots 0.14.26
Turing 0.18.0

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