]> code.communitydata.science - ml_measurement_error_public.git/blob - charts/example_1_dag/example_1_dag.tex
Add simulation of listwise deletion and averaging of labeled-only estimators
[ml_measurement_error_public.git] / charts / example_1_dag / example_1_dag.tex
1 \documentclass[12pt]{standalone}
2
3 \usepackage{ucs}
4 \usepackage[utf8x]{inputenc}
5
6 \usepackage[T1]{fontenc}
7 \usepackage{textcomp}
8 \renewcommand{\rmdefault}{ugm}
9 \renewcommand{\sfdefault}{phv}
10 \usepackage[garamond]{mathdesign}
11 \usepackage{tikz}
12 \usetikzlibrary{positioning, shapes, arrows, shadows, }
13
14 \begin{document}
15
16 \tikzset{>=latex}
17 \begin{tikzpicture}[
18   observed/.style={circle, draw},
19   unobserved/.style={draw, circle, fill=gray!40},
20   legend/.style={rectangle, draw},
21   partly observed/.style 2 args={draw, fill=#2, path picture={
22       \fill[#1, sharp corners] (path picture bounding box.south west) -|
23       (path picture bounding box.north east) -- cycle;},
24      circle}
25   ]
26
27
28   \node[observed] (y) {Y};
29 %   \node[observed,above=of y, xshift=1cm] (r) {R};
30   \node[partly observed={white}{gray!40}, above=of y] (x) {X};
31   \node[observed, left=of x,xshift=-1] (w) {W};
32   \node[unobserved, above=of w, xshift=1cm] (k) {K};
33   
34   \matrix [draw, below, yshift=-0.2cm, font=\small, align=center, column sep=2\pgflinewidth, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
35     \node[observed,label=right:observed] {}; \\
36     \node[unobserved,label=right:unobserved]{}; \\
37   };
38
39   \draw[->] (x) -- (y);
40   \draw[->] (x) -- (w);
41   \draw[-] (k) -- (x);
42   \draw[->] (k) -- (w);
43
44 \end{tikzpicture}
45 \end{document}
46

Community Data Science Collective || Want to submit a patch?