Skip to content

Facilitating DAGs #194

Open
Open
@bgoodri

Description

@bgoodri

I'm not sure that this should actually go into bayesplot but I figure the people who would be interested and able to do something like this would read bayesplot issues.

I think it would be good if we could draw Directed Acyclic Graphs (DAGs) for models that can be represented by DAGs. We can't do that just from posterior draws or even from Stan code (in general), but I hope we could render a DAG that a user expressed (or maybe generate them from syntax in brms / rstanarm / other packages).

The ggdag package is nice but is focused on identification of causal effects rather than a description of the generative process. It doesn't seem to have a great way of representing parameters, but maybe that could be added with a PR. PyMC3 recently added something like this, although I don't like some things about the formatting. I think WinBUGS established a convention of using rectangles for observables and ovals for unobservables. Also, I'm not sure I like the foo ~ Distribution being part of the node label. Maybe we could use different colors for each node and put the distributional assumptions into the key?

Anyway, if people have other ideas, we can discuss them here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions