Quick #sjPlot status update… #rstats #rstanarm #ggplot2

September 15, 2017

[This article was first published on R – Strenge Jacke!, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I’m working on the next update of my sjPlot-package, which will get a generic plot_model() method, which plots any kind of regression model, with different plot types being supported (forest plots for estimates, marginal effects and predictions, including displaying interaction terms, …).

The package also supports rstan resp. rstanarm models. Since these are typically presented in a slightly different way (e.g., „outer“ and „inner“ probability of credible intervals), I implemented a special handling for these models, for which I wanted to show a quick preview here:


m <- stan_glm(
  mpg ~ cyl + disp + drat + wt + gear + am,
  data = mtcars

plot_model(m) + theme_sjplot()

The thin error bars represent the High Density Intervals (HDI) specified in the ci.lvl argument, the thick bar is the 50%-HDI, and the white point is the posterior median.

This is still work in progress, the latest version is on GitHub

Tagged: data visualization, ggplot, R, rstan, rstanarm, rstats, sjPlot

To leave a comment for the author, please follow the link and comment on their blog: R – Strenge Jacke!.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)