The R package shinybrms provides a graphical user interface (GUI) for fitting Bayesian regression models using the R package brms which in turn relies on Stan. The shinybrms GUI is a shiny app.
To get an impression of the shinybrms app, see the Get Started page.
The following two sections describe two ways for launching the shinybrms app, either with or without the installation of shinybrms. The former is recommended as it offers all advantages that R packages have (e.g., offline usage). For both ways, the following steps need to be performed first:
install.packages("rstan", [...], dependencies = TRUE) with
[...] as advised there).Use one of the following approaches to install the R package shinybrms either from CRAN or from GitHub. The GitHub version might be more recent than the CRAN version, but the CRAN version might be more stable. Another decision is whether the example datasets from the R packages lme4, MASS, and rstanarm should be available.
To install shinybrms from CRAN:
install.packages("shinybrms", dependencies = TRUE)To install shinybrms from GitHub:
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
devtools::install_github("fweber144/shinybrms", dependencies = TRUE)To install shinybrms from CRAN:
install.packages("shinybrms")To install shinybrms from GitHub:
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
devtools::install_github("fweber144/shinybrms")Launch the shinybrms app by either running the following R code:
library(shinybrms)
launch_shinybrms()or this R code which ensures that the app opens up in the default web browser (helpful, e.g., if RStudio is used):
library(shinybrms)
launch_shinybrms(launch.browser = TRUE)Install the R package brms. The following R code may be used for this:
install.packages("brms")If the example datasets from the R packages lme4, MASS, and rstanarm should be available, these packages need to be installed. The following R code may be used for this:
install.packages(c("lme4", "MASS", "rstanarm"))Launch the shinybrms app directly from GitHub by either running the following R code:
shiny::runGitHub("fweber144/shinybrms",
subdir = "inst/shinybrms_app")or this R code which ensures that the app opens up in the default web browser (helpful, e.g., if RStudio is used):
shiny::runGitHub("fweber144/shinybrms",
subdir = "inst/shinybrms_app",
launch.browser = TRUE)