Anyone using stan for Bayesian Network models?

2,029 views
Skip to first unread message

CoreySparks

unread,
Jul 2, 2014, 9:39:19 PM7/2/14
to stan-...@googlegroups.com
Hi all, i've been using BUGS and JAGS for some time now and am converting over most of my courses in hierarchical modeling to stan, but i've recently become interested in Bayesian Network models (a la http://www.bnlearn.com/bnrepository/), and was curious if anyone had tried doing these kind of general DAG models in stan. Thanks for anything!
Corey

Bob Carpenter

unread,
Jul 3, 2014, 12:17:53 AM7/3/14
to stan-...@googlegroups.com
Stan can do posterior inference based on MCMC sampling for
any model expressible in BUGS, as long as:

* all parameters are continuous, and

* all the distributions used are in the Stan library
(or coded by the user in the Stan modeling language).

So we can't program the Asia model (which is from the BUGS examples)
because of the discrete nodes (well, technically we could probably code
it up in our Turing-equivalent generated quantities block,
but it wouldn't be pretty, wouldn't sample efficiently,
and I wouldn't recommend it).

But Stan doesn't do anything with graphs per se. It's just
that you can use BUGS-style models to define log densities, which
is what Stan deals with. In particular, we don't do any reasoning
over the graphical structure of models.

- Bob

On Jul 2, 2014, at 9:39 PM, CoreySparks <corey.sp...@gmail.com> wrote:

> Hi all, i've been using BUGS and JAGS for some time now and am converting over most of my courses in hierarchical modeling to stan, but i've recently become interested in Bayesian Network models (a la http://www.bnlearn.com/bnrepository/), and was curious if anyone had tried doing these kind of general DAG models in stan. Thanks for anything!
> Corey
>
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages