DAGS in Stan

Macartan Humphries writes:

As part of a project with Alan Jacobs we have put together a package that makes it easy to define, update, and query DAG-type causal models over binary nodes. We have a draft guide and illustrations here.

Now I know that you don’t care much for the DAG approach BUT this is all implemented in Stan so I’m hoping at least that it’ll make you go huh?.

The basic approach is to take any DAG over binary nodes, figure out the set of possible “causal types”, and update over this set using data. So far everything is done with a single but very flexible Stan model. The main limitations we see are that it is working only with binary nodes at the moment and that the type space blows up very quickly making computation difficult for complex models. Even still you can do quite a bit with it and quickly illustrate lots of ideas.

In Berlin we were also talking about case level explanation. If of interest this piece figures out the bounds that can be obtained on case level effects using mediators and moderators. Different to the approach you were discussing but maybe of interest.

Any comments welcome, as always (including a better name for the package)!

I followed the second link, and in the abstract is says, “We are now interested in assessing, for a case that was exposed and exhibited a positive outcome, whether it was the exposure that caused the outcome.” This doesn’t seem like a meaningful question to ask!

But maybe some of you will feel differently. And, as Macartan says, their method uses Stan, so I’m sharing this with all of you. Feel free to download the package, try out the methods, comment, etc.