Right --- no way to do a superset of Stan with a graphical
model that'll let us do the BUGS-like computations we want.
I see three possible benefits for having a graphical modeling
language.
1. Allow metaprogramming. That is, write programs that build
up graphical models. There's a natural structure of nodes
and links to manipulate. I really have no idea how useful this
would be, so I'd love to see some real examples from, say,
PyMC or NIMBLE, both of which should allow this.
The other use for metaprogramming would be program transformation.
We have some hope of doing that now because we get an
intermediate abstract syntax tree for all the constructs in a Stan
program.
2. Allow forward sampling. Right now, we can't figure out what's
a prior and what's higher level because there's no graphical structure.
We'd like to be able to automatically simulate data sets.
3. Allow easy Markov blanket computations so we can do
conditional sampling for discrete variables, which would allow us
to have missing data, variable selection (probably won't be able
to fit in any software), direct mixture model representations, etc.
The main reason we haven't done this is that the graphical
modeling language would be more restrictive. For example, you
could write the expectations out for an HMM or a CRF directly using
the forward/backward algorithm in Stan for efficient fitting
and code it directly in Stan's language.
- Bob