|
22 | 22 |
|
23 | 23 | \begin{tikzpicture}[background rectangle/.style={fill=none}, show background rectangle, color=black] |
24 | 24 |
|
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] |
59 | 27 | \node[draw=none, rectangle, anchor=north] (title) at (0, 0) {Causal Test Case}; |
60 | 28 | \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)] {}; |
64 | 30 | \end{scope} |
65 | 31 |
|
| 32 | + % Estimand |
66 | 33 | \begin{scope}[name prefix=estimand-, local bounding box=estimand, anchor=south, shift={($(test-test-case.east |- test-tuple.south) + (1, 0)$)}] |
67 | 34 | \node[anchor=south west] (eqn) at (0,0) { |
68 | 35 | $\Delta Y=\expe{[I=0 | X_1]} - \expe{[I=1 | X_1]} $ |
|
71 | 38 | \node[draw, rectangle] [fit=(estimand-title) (estimand-eqn)] {}; |
72 | 39 | \end{scope} |
73 | 40 |
|
| 41 | + % Estimate |
74 | 42 | \begin{scope}[name prefix=estimate-, local bounding box=estimate, shift={($(estimand-estimand.east)+(1, 0)$)}] |
75 | 43 | \node[draw=none, rectangle, anchor=south west] (title) at (0, 0) {Causal Estimate}; |
76 | 44 | \node[anchor=north] (table) at (title.south) { |
|
81 | 49 | \node[draw, rectangle] [fit=(title) (table) (top) (bot)] {}; |
82 | 50 | \end{scope} |
83 | 51 |
|
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 |
100 | 53 | \begin{scope}[name prefix=oracle-, local bounding box=test-oracle, shift={($(estimate-estimate.east) + (1.54, -0.4)$)}] |
101 | 54 | \begin{scope}[shift={(0,0)}, local bounding box=brain, scale=1.2] |
102 | 55 | \begin{scope}[shift={(-7.6932,3.5256)}, local bounding box=brain] |
|
126 | 79 | \node[draw, rectangle] [fit=(title) (brain)] {}; |
127 | 80 | \end{scope} |
128 | 81 |
|
| 82 | + % Outcome |
129 | 83 | \begin{scope}[name prefix=outcome-, local bounding box=test-outcome, shift={($(oracle-brain.east |- estimate-estimate.east) + (1, 0)$)}] |
130 | 84 | \node[draw=none, rectangle, anchor=south west] (title) at (0,0) {Test Outcomes}; |
131 | 85 | \node[draw=none, anchor=north] (ok) at (title.south) {\cmark ~ \xmark}; |
|
135 | 89 | \node[draw, rectangle] (test-outcome) [fit=(outcome-title) (outcome-ok) (top) (bot)] {}; |
136 | 90 | \end{scope} |
137 | 91 |
|
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); |
139 | 142 | \draw[edge, dashed] (test-test-case) -- (estimand-estimand); |
140 | 143 |
|
| 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 | + |
141 | 148 | \draw[edge, dashed] (data-test-data.south) -- (estimate-estimate.north); |
142 | 149 | \draw[edge, dashed] (estimand-estimand) -- (estimate-estimate); |
143 | 150 |
|
144 | 151 | \draw[edge, dashed] (estimate-estimate) -- (oracle-test-oracle.west |- estimate-estimate); |
145 | 152 | \draw[edge, dashed] (oracle-test-oracle.east |- outcome-test-outcome) -- (outcome-test-outcome); |
146 | 153 | \end{tikzpicture} |
147 | | -\end{document} |
| 154 | +\end{document} |
0 commit comments