]> code.communitydata.science - ml_measurement_error_public.git/blob - charts/example_3_dag/example_3_dag.tex
Update the core 4 simulations.
[ml_measurement_error_public.git] / charts / example_3_dag / example_3_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   partly observed/.style 2 args={draw, fill=#2, path picture={
20       \fill[#1, sharp corners] (path picture bounding box.south west) -|
21       (path picture bounding box.north east) -- cycle;},
22      circle},
23     unobserved/.style={draw, circle, fill=gray!40}
24   ]
25
26   \node[observed] (y) {Y};
27 %  \node[observed,above=of y, xshift=1cm] (r) {R};
28   \node[partly observed={white}{gray!40}, above = of y] (x) {X};
29   \node[observed, left=of x] (w) {W};
30   \node[unobserved, above=of w, xshift=1cm] (k) {K};
31   \node[unobserved, right=of k] (u) {U};
32
33 %  \draw[->] (r) -- (y);
34 %  \draw[->] (r) -- (x);
35   \draw[->] (x) -- (y);
36   \draw[->] (x) -- (w);
37   \draw[->] (x) -- (k);
38   \draw[->] (k) -- (w);
39   \draw[->] (u) to [out=270,in=30] (y);
40   \draw[->] (u) -- (k);
41
42   
43   \matrix [draw, below, yshift=-0.2cm, inner sep=0.6em, outer sep=0em, nodes={align=center, anchor=center}] at (current bounding box.south){
44     \node[observed,label=right:observed] {}; \\
45     \node[unobserved,label=right:unobserved]{}; \\
46   };
47
48
49 \end{tikzpicture}
50 \end{document}
51

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