knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

brmstools

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

Install brmstools from GitHub with devtools:

# install.packages("devtools")
devtools::install_github("mvuorre/brmstools")

Loading brmstools also loads the brms package:

library(brmstools)

Forest plots

Notably, forest() draws forest plots for meta-analytic and multilevel models:

load(here::here("vignettes/forest-plots/fit_rem.rda"))
forest(fit_rem)

Panel plots

panels() draws panel plots:

load(here::here("vignettes/forest-plots/fit_ml.rda"))
panels(fit_ml, xvar = "Days")

Spaghetti plots

spaghetti() draws spaghetti plots:

spaghetti(fit_ml, xvar = "Days")

Coefficient plots

coefplot() draws coefficient plots:

coefplot(fit_ml)

More information

Examples and instructions can be found at https://mvuorre.github.io/brmstools.



mvuorre/brmstools documentation built on July 10, 2018, 7:49 a.m.