Skip to content

Commit 5aa34ac

Browse files
committed
New schematic
1 parent e9db312 commit 5aa34ac

3 files changed

Lines changed: 62 additions & 55 deletions

File tree

images/schematic-dark.png

-35 KB
Loading

images/schematic.png

-33 KB
Loading

images/schematic.tex

Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,14 @@
2222

2323
\begin{tikzpicture}[background rectangle/.style={fill=none}, show background rectangle, color=black]
2424

25-
\begin{scope}[name prefix=scenario-, local bounding box=specification]
26-
% Causal DAG
27-
\begin{scope}[name prefix=dag-]
28-
\node[node] (x1) at (-0.1,-0.2) {$X_1$};
29-
\node[node] (x2) at (-0.1, 1.2) {$X_2$};
30-
\node[node] (i) at (0.5,0.5) {$I$};
31-
\node[node] (y1) at (1.3,-0.2) {$Y_{1}$};
32-
\node[node] (y2) at (1.3,0.5) {$Y_2$};
33-
\node[node] (y3) at (1.3,1.2) {$Y_3$};
34-
35-
\draw[edge] (x1) to (i);
36-
\draw[edge] (x2) to (i);
37-
\draw[edge] (i) to (y1);
38-
\draw[edge] (i) to (y2);
39-
\draw[edge] (i) to (y3);
40-
\draw[edge] (x1) to (y1);
41-
\draw[edge] (x2) to (y3);
42-
\node[draw=none, rectangle] (nodes) [fit=(x1) (x2) (y1) (y2) (y3) (i)] {};
43-
\node[draw=none, rectangle, anchor=south] (title) at (nodes.north) {Causal DAG};
44-
\end{scope}
45-
\node[draw, rectangle] (dag) [fit=(dag-nodes) (dag-title)] {};
46-
47-
\begin{scope}[name prefix=scenario-, shift={($(dag.east |- dag-title.north)+(0.3, 0)$)}, anchor=north west]
48-
\node[draw=none, rectangle] (title) at (0, 0) {Modelling Scenario};
49-
\node[anchor=north] (constraints) at (title.south) {$\{ x_1 < 5, x_2 = \text{``UK''} \}$};
50-
\end{scope}
51-
\node[draw, rectangle] (scenario) [fit=(scenario-title) (scenario-constraints)] {};
52-
53-
\node[draw=none, rectangle] (scenario) [fit=(dag) (scenario)] {};
54-
\node[draw=none, rectangle, anchor=south] (title) at (scenario.north) {Causal Specification};
55-
\end{scope}
56-
\node[draw, rectangle] [fit=(scenario-scenario) (scenario-title)] {};
57-
58-
\begin{scope}[name prefix=test-, local bounding box=test-case, shift={($(scenario-specification.south)+(0, -1)$)}]
25+
% Test Case
26+
\begin{scope}[name prefix=test-, local bounding box=test-case]
5927
\node[draw=none, rectangle, anchor=north] (title) at (0, 0) {Causal Test Case};
6028
\node[anchor=north] (tuple) at (title.south) {$(X=i, \Delta=\text{increase}, Y=y_1)$};
61-
\coordinate (left) at (scenario-scenario.east |- {(0, 0)});
62-
\coordinate (right) at (scenario-scenario.west |- {(0, 0)});
63-
\node[draw, rectangle] [fit=(title) (tuple) (left) (right)] {};
29+
\node[draw, rectangle] [fit=(title) (tuple)] {};
6430
\end{scope}
6531

32+
% Estimand
6633
\begin{scope}[name prefix=estimand-, local bounding box=estimand, anchor=south, shift={($(test-test-case.east |- test-tuple.south) + (1, 0)$)}]
6734
\node[anchor=south west] (eqn) at (0,0) {
6835
$\Delta Y=\expe{[I=0 | X_1]} - \expe{[I=1 | X_1]} $
@@ -71,6 +38,7 @@
7138
\node[draw, rectangle] [fit=(estimand-title) (estimand-eqn)] {};
7239
\end{scope}
7340

41+
% Estimate
7442
\begin{scope}[name prefix=estimate-, local bounding box=estimate, shift={($(estimand-estimand.east)+(1, 0)$)}]
7543
\node[draw=none, rectangle, anchor=south west] (title) at (0, 0) {Causal Estimate};
7644
\node[anchor=north] (table) at (title.south) {
@@ -81,22 +49,7 @@
8149
\node[draw, rectangle] [fit=(title) (table) (top) (bot)] {};
8250
\end{scope}
8351

84-
\begin{scope}[name prefix=data-, local bounding box=test-data, shift={($(estimate-estimate.north)+(0, 1)$)},]
85-
\node[draw=none, rectangle] (title) at (estimate-estimate |- scenario-title) {Test Data};
86-
\node[anchor=north] (table) at (title.south) {
87-
\begin{tabular}{rrrrrr}
88-
\toprule
89-
$X_1$ & $X_2$ & $I$ & $Y_1$ & $Y_2$ & $Y_3$ \\
90-
\midrule
91-
1.2 & ``UK'' & 0.3 & 7.8 & 4 & 100 \\
92-
3.2 & ``UK'' & 0.1 & 7.6 & 8 & 95 \\
93-
\multicolumn{6}{c}{$\vdots$} \\
94-
\bottomrule
95-
\end{tabular}
96-
};
97-
\node[draw, rectangle] [fit=(title) (table)] {};
98-
\end{scope}
99-
52+
% Oracle
10053
\begin{scope}[name prefix=oracle-, local bounding box=test-oracle, shift={($(estimate-estimate.east) + (1.54, -0.4)$)}]
10154
\begin{scope}[shift={(0,0)}, local bounding box=brain, scale=1.2]
10255
\begin{scope}[shift={(-7.6932,3.5256)}, local bounding box=brain]
@@ -126,6 +79,7 @@
12679
\node[draw, rectangle] [fit=(title) (brain)] {};
12780
\end{scope}
12881

82+
% Outcome
12983
\begin{scope}[name prefix=outcome-, local bounding box=test-outcome, shift={($(oracle-brain.east |- estimate-estimate.east) + (1, 0)$)}]
13084
\node[draw=none, rectangle, anchor=south west] (title) at (0,0) {Test Outcomes};
13185
\node[draw=none, anchor=north] (ok) at (title.south) {\cmark ~ \xmark};
@@ -135,13 +89,66 @@
13589
\node[draw, rectangle] (test-outcome) [fit=(outcome-title) (outcome-ok) (top) (bot)] {};
13690
\end{scope}
13791

138-
\draw[edge, dashed] ($(scenario-specification.east) + (0.15, 0)$) -- (estimand-estimand.north |- scenario-specification.east) -- (estimand-estimand.north);
92+
93+
% Causal DAG
94+
\begin{scope}[name prefix=dag-, shift={($(estimand-estimand.north) + (0, 2)$)}]
95+
\node[node] (x1) at (-1, 0) {$X_1$};
96+
\node[node] (x2) at (-1, 1.4) {$X_2$};
97+
\node[node] (i) at (0, 0.7) {$I$};
98+
\node[node] (y1) at (1,0) {$Y_{1}$};
99+
\node[node] (y2) at (1,0.7) {$Y_2$};
100+
\node[node] (y3) at (1,1.4) {$Y_3$};
101+
102+
\draw[edge] (x1) to (i);
103+
\draw[edge] (x2) to (i);
104+
\draw[edge] (i) to (y1);
105+
\draw[edge] (i) to (y2);
106+
\draw[edge] (i) to (y3);
107+
\draw[edge] (x1) to (y1);
108+
\draw[edge] (x2) to (y3);
109+
\node[draw=none, rectangle] (nodes) [fit=(x1) (x2) (y1) (y2) (y3) (i)] {};
110+
\node[draw=none, rectangle, anchor=south] (title) at (nodes.north) {Causal DAG};
111+
\end{scope}
112+
113+
% Scenario
114+
\begin{scope}[name prefix=scenario-, shift={($(estimand-estimand.south) + (0, -2)$)}]
115+
\node[draw=none, rectangle] (title) at (0, 0) {Modelling Scenario};
116+
\node[anchor=north] (constraints) at (title.south) {$\{ x_1 < 5, x_2 = \text{``UK''} \}$};
117+
\end{scope}
118+
\node[draw, rectangle] (scenario) [fit=(scenario-title) (scenario-constraints)] {};
119+
120+
% Data
121+
\begin{scope}[name prefix=data-, local bounding box=test-data]
122+
\node[draw=none, rectangle] (title) at (estimate-estimate |- dag-title) {Test Data};
123+
\node[anchor=north] (table) at (title.south) {
124+
\begin{tabular}{rrrrrr}
125+
\toprule
126+
$X_1$ & $X_2$ & $I$ & $Y_1$ & $Y_2$ & $Y_3$ \\
127+
\midrule
128+
1.2 & ``UK'' & 0.3 & 7.8 & 4 & 100 \\
129+
3.2 & ``UK'' & 0.1 & 7.6 & 8 & 95 \\
130+
\multicolumn{6}{c}{$\vdots$} \\
131+
\bottomrule
132+
\end{tabular}
133+
};
134+
\node[draw, rectangle] [fit=(title) (table)] {};
135+
\end{scope}
136+
137+
% DAG outline
138+
\node[draw, rectangle] (dag) [fit=(dag-nodes) (dag-title) (dag-title |- data-table.south)] {};
139+
140+
%Information flow
141+
\draw[edge, dashed] (dag) -- (estimand-estimand.north);
139142
\draw[edge, dashed] (test-test-case) -- (estimand-estimand);
140143

144+
\draw[edge, dashed] (scenario.north) -- (estimand-estimand);
145+
\draw[edge, dashed] (scenario.north) -- ([yshift=7.3mm]scenario.north) -- ([yshift=7.3mm]scenario.north -| test-test-case) -- (test-test-case);
146+
\draw[edge, dashed] (scenario.north) -- ([yshift=7.3mm]scenario.north) -- ([yshift=7.3mm]scenario.north -| estimate-estimate) -- (estimate-estimate);
147+
141148
\draw[edge, dashed] (data-test-data.south) -- (estimate-estimate.north);
142149
\draw[edge, dashed] (estimand-estimand) -- (estimate-estimate);
143150

144151
\draw[edge, dashed] (estimate-estimate) -- (oracle-test-oracle.west |- estimate-estimate);
145152
\draw[edge, dashed] (oracle-test-oracle.east |- outcome-test-outcome) -- (outcome-test-outcome);
146153
\end{tikzpicture}
147-
\end{document}
154+
\end{document}

0 commit comments

Comments
 (0)