Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update backdoor_example.md #106

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/examples/backdoor_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ because that conditioning opens up a non-causal path via 6 ← 3 ← 1 → 4 ←
![Opened new path](https://raw.githubusercontent.com/mschauer/CausalInference.jl/master/assets/backdoor2.png)


But conditioning on both `Z = [3, 4]` solves the problem, as verified by the backdoor criterion.
But conditioning on both `Z = [4, 5]` solves the problem, as verified by the backdoor criterion.
```julia
backdoor_criterion(dag, 6, 8, [3, 4]) # true
backdoor_criterion(dag, 6, 8, [4, 5]) # true
```
(also conditioning on `Z = [4, 5]` would be possible.)
(also conditioning on `Z = [3, 4]` would be possible.)

Thus, regressing `Y` on `X` and controlling for variables numbered `Z=[3, 4]` we measure the average causal effect.
Thus, regressing `Y` on `X` and controlling for variables numbered `Z = [4, 5]` we measure the average causal effect.

![Good controls](https://raw.githubusercontent.com/mschauer/CausalInference.jl/master/assets/backdoor3.png)

Expand Down
Loading