Skip to content

Statistical Rethinking 2026: Lecture A06

Solutions to the homework assignment.

Level Beginner
Tags Causal inference
Links Stan R Python Julia

In the sixth exercise from the beginner section, we first simulate data based on a DAG (Directed Acyclic Graph) and then estimate the causal effect between two variables.

The cool thing is that at the end we can actually check if we were able to “recover” the relationship between the variables we set when simulating the data. On the way to the right answer, we’ll need to think about confounding and use some do-calculus.