, 18 tweets, 8 min read
My Authors
Read all threads
Pleased to announce that #tidybayes v2.0 (SLABS FOR DAYS edition) hit CRAN today. #rstats

Lots of new stuff in this version: A THREAD
The biggest thing is the new slab+interval meta-geom, generalizing old #tidybayes geoms and enabling a bunch of new ones. This is a flexible FAMILY of #ggplot geoms for visualizing probability distributions and uncertainty using slabs (densities, cdfs, etc), points, and intervals
The slab+interval meta-geom now drives old standards like eyes and half-eyes...
But also enables a variety of new geoms, like histogram+intervals...
...CCDF barplots...

(also note dodging is supported by all slab+interval geoms)
...gradient + interval plots...
...and quantile dotplots, amongst other things.

(dodge-able, just like everything else :) )
The dotplots, btw, automatically choose bin size based on the viewport.
While a variety of "template" geoms and stats are provided for common combinations, numerous custom combinations are possible. E.g. we can remap the CCDF function onto alpha instead of slab thickness to make a CCDF gradient plot.
Variables can be mapped onto fill and color within-slabs, which both enables gradient plots (above) and allows custom plots, like this plot of a region of practical equivalence (ROPE)
The "stat_dist_..." subfamily also allows visualization of analytical distributions using all the same geoms above. E.g. This visualization showing a Beta(alpha, 10) distribution for different values of alpha...
...or this visualization of priors from a #brms model, also enabled by the new parse_dist() function which turns prior specs like "normal(0,1)" into columns that can be mapped onto aesthetics in a ggplot.
The ability to visualize analytical distirbutions easily also makes it easy to do *frequentist* visualization in tidybayes (blasphemy!!!). See this vignette: mjskay.github.io/tidybayes/arti…
That means you can now do halfeyes, gradient plots, lineribbons, dotplots, and everything else ON FREQUENTIST MODELS with broom + tidybayes by mapping estimates, standard errors, and (optionally) degrees of freedom onto distribution params.

E.g. here's halfeyes and lineribbons
It's also easier to create Kruschke-style distribution-of-distribution plots for posterior predictions using the new stat_dist_slabh() applied to draws from the joint posterior for mu and sigma.
For more on these new geoms, check out the new slabinterval vignette: mjskay.github.io/tidybayes/arti…
Finally and more esoterically, tidybayes now includes the marginal distribution for a single cell in an LKJ-distributed correlation matrix, to help with visualizing LKJ priors (because what even does an LKJ prior imply??)

mjskay.github.io/tidybayes/refe…
Anyhue, read more about it in the changelog: mjskay.github.io/tidybayes/news…

Thanks to everyone who's given feedback on the package, and of course to the great software it builds upon, like @mcmc_stan, #brms, #rstanarm, #ggplot, the #tidyverse, etc.
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Matthew Kay

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!