Guide to Bayesian Viz?

I was curious if anyone has good resources for Bayesian visualization? I’m doing some modelling for an academic paper and am using Hierarchical GLMs. I’m relatively new to using primarily Bayesian methods, but I’m turning to them more and more. My big question is how do people really visualize the inner-working of these models for academic papers? What do people tend to report and deem as necessary? My field (systems neuroscience) is much more in the frequentist regime and so I find that not all plots are well transferable. Hope this question makes sense.

I think the best place to start is the Bayesian workflow paper, and while you’re reading take a look at Arviz. Though it’s long, that paper is very readable.

Jessica Hullman and Matthew Kay are two great places to start on thinking about this from an academic standpoint.

I like the Gelman paper, but it’s very technical–I’ve had the most success in sharing Bayesian model output to my leadership team with beeswarm plots to show posterior distributions. Strong use of annotations in ggplot also helps so that they understand what they’re looking at in detail.

Hi, @jacobpstein and welcome to the forums!

I hadn’t heard of “beeswarm plots” before, but it looks like they’re univariate. Is there an equivalent for scatterplots for 2 dimensions?

Were you saying the workflow paper was too technical? That’s too bad, because we intended it for an applied crowd. It’s hard to tell as an author when you’ve internalized all the theory. I’m finding the longer I stay in stats, the more obscure my writing is to my computer science peers.

The workflow book is out. It expands on the paper with many more case studies and hopefully more background material. I don’t see a free download link like for Bayesian Data Analysis (which is way way more technical than the workflow paper). Ironically, I opted out of continuing to work on workflow as a co-author because it wasn’t technical enough for me to feel like I had my feet firmly on the ground (and I’d prefer to never have to open R again).

The paper the same crew wrote that really led into the workflow paper was Gabry et al.'s Visualization in Bayesian workflow paper.

I should be clear: I’m a big fan of the workflow paper! and I am excited to get and work through the book.

To bring a little precision to the discussion, I think the paper does a great job providing diagnostic and exploratory plot examples for helping people improve their work. In presenting Bayesian workflow output to non-technical audiences, I’ve found that a slightly different grammar of graphics is needed because people may not know (and more often don’t care) about the specific role viz plays in the workflow paper (and now book).

The way I use beeswarms here is for multilevel models: the grouping factor goes on the y-axis (one row per group), and the x-axis is the posterior value. Each group’s row is a swarm of posterior draws, so you see the full shape of each group’s posterior stacked across groups; basically a forest plot where the interval is replaced by the actual distribution of draws.

For example, with a model of NBA team offensive ratings (games nested within teams), you’d have one row per team, each row a swarm of that team’s posterior draws, ordered by the estimate with league average as a reference line. You see each team’s level and its uncertainty at a glance.

So it’s not really univariate in the limiting sense-- the y-axis carries real information (which group), and the x-axis carries the posterior. The swarm just spreads the draws within each row so they don’t overplot.

You can add size, color, and alpha adjustments if you want to layer on complexity. I try to only pick one of those because it just gets to be too much (for me).