⚠️There's a newer version (1.8.0) of this package. Take me there.

shinybrms

Description

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, have a look at this page. The following text explains how to launch the shinybrms app.

Launching the shinybrms app

The following two sections describe two options for launching the shinybrms app, either with or without the installation of shinybrms. The first option is recommended as it offers all advantages that R packages have (e.g. offline usage). For both options, you need to perform the following steps first:

  1. Install R (see the R homepage).
  2. Install the R package rstan (see the “RStan Getting Started” GitHub page for instructions; make sure to use install.packages("rstan", [...], dependencies = TRUE) with [...] as advised on the “RStan Getting Started” GitHub page).

With installation of shinybrms

  1. In this first step, you will 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. You also need to decide whether you want to use the example datasets from the R packages lme4, MASS, and rstanarm or not.

    • If you want to use the example datasets from the R packages lme4, MASS, and rstanarm, then the R code for installing shinybrms from CRAN and GitHub (respectively) is as follows:
      • 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)
    • If you don’t want to use the example datasets from the R packages lme4, MASS, and rstanarm, then the R code for installing shinybrms from CRAN and GitHub (respectively) is as follows:
      • 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")
  2. 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 you are using RStudio):

    library(shinybrms)
    launch_shinybrms(launch.browser = TRUE)

Without installation of shinybrms

  1. Install the R package brms. You may use the following R code for this:

    install.packages("brms")
  2. If you want to use the example datasets from the R packages lme4, MASS, and rstanarm, you need to install these packages. You may use the following R code for this:

    install.packages(c("lme4", "MASS", "rstanarm"))
  3. 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 you are using RStudio):

    shiny::runGitHub("fweber144/shinybrms",
                     subdir = "inst/shinybrms_app",
                     launch.browser = TRUE)

Copy Link

Version

Down Chevron

Install

install.packages('shinybrms')

Monthly Downloads

322

Version

1.5.0

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

November 21st, 2020

Functions in shinybrms (1.5.0)