You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/walkthrough.md
+22-64Lines changed: 22 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ d_string = "DAG(
24
24
statistics ~ algebra+analysis,
25
25
analysis ~ algebra)"
26
26
27
-
dag =DAG("marks", d_string, df);
27
+
dag =DAG("marks", d_string; df=df);
28
28
show(dag)
29
29
```
30
30
@@ -50,7 +50,6 @@ OrderedDict{Symbol,Union{Nothing, Array{Symbol,1}, Symbol}} with 4 entries:
50
50
51
51
Internally, a DAG object will always contain an OrderedDict representation of the DAG. This representation is used in all functions. In the definition of the OrderedDict, read `=>` as `~` in regression models or `<-` in causal models.
52
52
53
-
54
53
Optional display the DAG using GraphViz:
55
54
```julia
56
55
fname = ProjDir *"/marks.dot"
@@ -60,7 +59,7 @@ Sys.isapple() && run(`open -a GraphViz.app $(fname)`)
60
59
61
60
The DAG pdf is [here](https://github.com/StatisticalRethinkingJulia/StructuralCausalModels.jl/blob/master/docs/src/marks.pdf).
62
61
63
-
In this case a DataFrame with observed values has been provided and the related covariance matrix has been computed and stored in the DAG object:
62
+
In this example a DataFrame with observed values has been provided and the related covariance matrix will be computed and stored in the DAG object:
64
63
```julia
65
64
display(dag.s)
66
65
@@ -93,68 +92,27 @@ Although this initial version of StructuralCausalModels does not support latent
93
92
94
93
# Directed separation
95
94
96
-
Given a causal graph, `d_separation(dag, f, l, cond)` determines if the vertices in set `f` are `d-separated` from the vertices in set `l` given the conditioning set `cond`.
95
+
Given a causal graph`dag`, `d_separation(dag, f, l, cond)` determines if the vertices in set `f` are `d-separated` from the vertices in set `l` given the conditioning set `cond`.
97
96
98
97
Show several `d_separation` results for the marks model:
99
98
```julia
100
-
f = [:statistics]; s = [:mechanics]; sel =vcat(f, s)
D_separation provides a set of conditional independencies given the causal model. The conditioning set closes (blocks) all paths. It provides ways to test the chosen causal model given observational data.
139
+
The function `basis_set()`provides a set of conditional independencies given the causal model. The conditioning set closes ("blocks the flow of causal info") all paths. The conditioning_set can be empty. It provides ways to test the chosen causal model given observational data.
192
140
193
141
The function `adjustment_sets()` answers a related question, i.e. how to prevent confounding in multiple regression models assuming the chosen causal model is correct.
0 commit comments