Sample graph generation using Graphviz dot
#!/bin/bash
dot -Tpng simpledag.dot > simpledag.png
digraph G {
// Y depends on mu and sigma
mu -> y;
sigma -> y;
// Mu depends on three latent variables
h1 -> mu;
h2 -> mu;
h3 -> mu;
// They are calculated from x and b
x1 -> h1;
b1 -> h1;
x2 -> h2;
b2 -> h2;
x3 -> h3;
b3 -> h3;
// H1 Affects sigma too
h1 -> sigma;
}