Notes and exercises for Statistical Rethinking
1
About this project
2
Small worlds and large worlds
2.1
reproducing figures in text
2.1.1
with various priors
2.2
quadratic approx.
2.2.1
quick check to confirm it works
2.2.2
example from the text
2.3
Practice
2.3.1
2E1
2.3.2
2E2
2.3.3
2E3
2.3.4
2E4
2.3.5
2M1
3
Sampling the Imaginary
3.1
Figures and text
3.2
simulation for prediction
3.3
making breaking predicitons
3.4
exercises
3.4.1
how much lies below
p = 0.2
?
3.4.2
how much lies above 0.8?
3.4.3
how much between 0.2 and 0.8
3.4.4
20% is below which value?
3.4.5
20% is above which value?
3.4.6
Which values contain the narrowest interval with 66% of posterior?
3.4.7
which values contain 66% of the variation, with equal amounts in the tails?
3.4.8
Medium
3.4.9
posterior predictive check
3.4.10
what is the probility of 6/9?
3.5
Hard
3.5.1
use grid approximation to estimate the posterior distribution of the probility of a male
3.5.2
sample from the posterior distribution and get HPDI
3.5.3
simulate predictions
3.5.4
now, using the same posterior for all births, consider the first born only!
3.5.5
simulate boys after girls
4
Linear Models
4.1
Figures
4.1.1
Gaussian model of height
4.1.2
grid approximation
4.1.3
Fittin the model with MAP
4.2
Adding a predictor
4.2.1
Polynomial
4.3
Exercises
4.3.1
easy
4.3.2
medium
4.3.3
hard
4.4
When adding variables hurts
4.4.1
the trouble with fitting post-treatment effects
4.4.2
Could multilevel models help here?
4.5
Binomial
4.6
Poisson
5
Linear Models
5.0.1
comparing multiple-intercepts to partial pooling
5.1
The underfitting / overfitting tradeoff
5.2
More than one type of cluster
5.3
chimps with two kinds of cluster
5.4
multilevel predictions
5.5
varying intercepts to model over-dispersion
6
Adventures in covariance
6.0.1
prelude to building a varying slopes model
6.1
Admissions
6.2
Continuous categories and the Gaussian process
References
7
The Golem of Prague
8
Small worlds and large worlds
9
Sampling the Imaginary
10
Linear Models
10.1
When adding variables hurts – from reading
11
Placeholder
12
Linear Models
13
Adventures in covariance
14
Placeholder
Published with bookdown
Exercises from ‘Statistical Rethinking’
References