I would like to visualize the relationships between variables in the brms / stan models I write. I could make these myself for each model, but I'm hoping there's a package to generate them automatically. Does this exist?

Here are examples from pymc3 and greta:

pymc3: For some model you can call pm.model_to_graphviz(model) and get a result like this:

pymc3 parameter dag

greta: Pulling from the 8 schools example, plot(model) produces a graph like this: greta parameter dag for 8 schools model

In case the pictures above are unclear or fail to appear, let me describe in a little more detail. I'd like to visualize the model itself, seeing a DAG of how the parameters relate to one another (before doing any sampling). This is different than bayesplot or other tools that plot priors, posteriors, or MCMC draws.


As of May 2020, this doesn't exist. Thanks Ben Goodrich for letting me know and pointing to the relevant Github issue! https://github.com/stan-dev/bayesplot/issues/194


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.