]> code.communitydata.science - ml_measurement_error_public.git/blobdiff - charts/example_4_dag.tex
Merge branch 'master' of code:ml_measurement_error_public
[ml_measurement_error_public.git] / charts / example_4_dag.tex
diff --git a/charts/example_4_dag.tex b/charts/example_4_dag.tex
new file mode 100644 (file)
index 0000000..a3413c0
--- /dev/null
@@ -0,0 +1,47 @@
+\documentclass[12pt]{standalone}
+
+\usepackage{ucs}
+\usepackage[utf8x]{inputenc}
+
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\renewcommand{\rmdefault}{ugm}
+\renewcommand{\sfdefault}{phv}
+\usepackage[garamond]{mathdesign}
+\usepackage{tikz}
+\usetikzlibrary{positioning, shapes, arrows, shadows}
+
+\begin{document}
+\tikzset{
+  observed/.style={circle, draw},
+  partly observed/.style 2 args={draw, fill=#2, path picture={
+      \fill[#1, sharp corners] (path picture bounding box.south west) -|
+      (path picture bounding box.north east) -- cycle;},
+     circle},
+    unobserved/.style={draw, circle, fill=gray!40},
+    residual/.style={draw, rectangle}
+}
+
+\tikzset{>=latex}
+
+\begin{tikzpicture}
+  \node[unobserved] (y) {$Y$};
+
+  \node[observed={white}{gray!40}, above=of y] (x) {$X$};
+  \node[observed, left=of x] (w) {$W$};
+
+%  \node[unobserved, above=of w] (k) {$K$};
+  \node[observed,right=of x] (z) {$Z$};
+%   \node[residual,below=of y] (e) {$\varepsilon$};
+%   \node[residual,below=of w] (xi) {$\xi$};
+  \draw[->] (x) -- (y);
+%  \draw[->] (x) -- (w);
+  \draw[->] (y) -- (w);
+%  \draw[->] (k) -- (w);
+  \draw[->] (z) -- (y);
+%  \draw[->] (z) -- (k);
+%  \draw[->] (y) -- (xi);
+%  \draw[->] (w) -- (xi);
+\end{tikzpicture}
+\end{document}
+

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