brmstools is an R package available on GitHub.
brmstools provides convenient plotting and post-processing functions for brmsfit objects (bayesian regression models fitted with the brms R package).
brmstools is in beta version so will probably break down with some
inputs: Suggestions for improvements and bug
reports are welcomed. For
anything more complex I strongly recommend using brms’ native functions
instead (particularly its marginal_effects()
and hypothesis()
methods. Combined with ggplot2 those functions will create any
visualization you can think of.)
Install brmstools from GitHub with devtools:
# install.packages("devtools")
devtools::install_github("mvuorre/brmstools")
Loading brmstools also loads the brms package:
library(brmstools)
#> Loading required package: ggplot2
#> Loading required package: brms
#> Loading required package: Rcpp
#> Loading 'brms' package (version 2.3.4). Useful instructions
#> can be found by typing help('brms'). A more detailed introduction
#> to the package is available through vignette('brms_overview').
#> Run theme_set(theme_default()) to use the default bayesplot theme.
Notably, forest()
draws forest plots for meta-analytic and multilevel
models:
forest(fit_rem)
#> Picking joint bandwidth of 0.0227
panels()
draws panel plots:
panels(fit_ml, xvar = "Days")
spaghetti()
draws spaghetti plots:
spaghetti(fit_ml, xvar = "Days")
coefplot()
draws coefficient plots:
coefplot(fit_ml)
Examples and instructions can be found at https://mvuorre.github.io/brmstools.