Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
probml
GitHub Repository: probml/pyprobml
Path: blob/master/tikz/DiD-DAG.tex
1191 views
1
\documentclass[tikz, border=2pt]{standalone}
2
% main document, called main.tex
3
\usepackage{tikz}
4
\begin{document}
5
6
\usetikzlibrary{fit,arrows,calc,positioning,shadows.blur}
7
8
\begin{tikzpicture}[var/.style={draw,circle,inner sep=0pt,minimum size=1.2cm},
9
latentconf/.style={draw,circle,dashed,inner sep=0pt,minimum size=1.2cm, fill=green!5}
10
]
11
% Nodes
12
\node (A) [var] {$A$};
13
% \node (A) [var, right=.8cm of Z] {$A$};
14
\node (U) [latentconf, above=.8cm of A] {$U$};
15
\node (Y) [var, right=.8cm of U] {$Y_1 - Y_0$};
16
\node (X) [var, above=.8cm of U] {$X$};
17
18
% Arrows
19
\path[->, line width=0.5mm]
20
(A) edge (Y)
21
(U) edge (A)
22
(X) edge (Y)
23
(U) edge (X)
24
(U) edge (Y);
25
\path[<->, line width=0.5mm]
26
(A) edge[bend left=90, dashed] (U);
27
28
\end{tikzpicture}
29
30
\end{document}
31
32