5.1 Introduction

Our GUI enables users to perform inference using Bayesian regression analysis without requiring programming skills. The latter is often a significant impediment to the widespread adoption of the Bayesian framework (Woodward 2005; Karabatsos 2016).

Several other graphical user interfaces are available for Bayesian regression analysis. ShinyStan (Stan Development Team 2017) is a highly flexible, open-source program; however, users must have some programming skills. It is based on the Stan software for Bayesian data analysis (B. Carpenter et al. 2017). BugsXLA (Woodward 2005) is also open source but less flexible, though it does not require programming skills. Bayesian Regression: Nonparametric and Parametric Models (Karabatsos 2016) is a user-friendly and flexible GUI based on the MATLAB Compiler for 64-bit Windows systems. It primarily focuses on Bayesian nonparametric regression and is designed for users already familiar with basic parametric models, such as those implemented in our GUI. Additionally, there are tools such as the MATLAB Toolkit, Stata, and BayES, but these are not open source.

We developed our GUI as an interactive web application using shiny (Chang 2018) and various libraries in R (R Core Team 2023). The specific libraries and commands used in our GUI are listed in the Appendix. It includes ten univariate models, four multivariate models, four time series models, three hierarchical longitudinal models, and seven Bayesian model averaging frameworks. Additionally, it provides basic summaries and diagnostics of the posterior chains, as well as visualizations such as trace plots, autocorrelation plots, and density plots.

In terms of flexibility and functionality, our GUI falls between ShinyStan and BugsXLA: users do not need programming skills, but it is not as advanced as the software in Karabatsos (2016). However, our GUI runs on any operating system. We call our GUI BEsmarter,25 and it is freely available at https://github.com/besmarter/BSTApp, where users can access all source code and datasets.

Simulated and applied datasets are stored in the DataSim and DataApp folders of our GitHub repository (see the Appendix for details). The DataSim folder includes the files used to simulate different processes, providing access to population parameters. As a result, these files serve as a valuable pedagogical tool for illustrating statistical properties of the inferential frameworks available in our GUI. The DataApp folder contains the datasets used in this book, which users can use as templates for structuring their own datasets.

There are three ways to install our GUI. The easiest method, which requires installing R and potentially an R code editor, is to type:

There are three ways to install our GUI. The easiest way, but that requires installation of R and potentially a R code editor, is to type shiny::runGitHub("besmarter/BSTApp", launch.browser=T) in the R console or any R code editor and execute it.

The second option is to visit https://posit.cloud/content/4328505:

  1. log in or sign up for Posit Cloud, and access the project titled GUIded Bayesian Regression App BSTApp
  2. In the bottom-right window, navigate to the BSTApp-master folder under Files, open the app.R file, and click the Run App button.

However, prolonged inactivity may cause the session to close.

The third approach, and our recommendation, is using a Docker image by running:

  1. docker pull magralo95/besmartergui:latest
  2. docker run --rm -p 3838:3838 magralo95/besmartergui

in your Command Prompt, this command creates an isolated environment for our GUI, ensuring consistent performance across different systems. Note that Docker must be installed to deploy our GUI using this method. Users can then access the app by navigating to 127.0.0.1:3838 or http://localhost:3838/.

After using any of the three methods to run our GUI, users will see a new window displaying a presentation of our research team (see Figure 5.1). Additionally, the top panel in Figure 5.1 shows the categories of models that can be estimated in our GUI.

Display of graphical user interface.

Figure 5.1: Display of graphical user interface.

References

Carpenter, Bob, Andrew Gelman, Matthew D Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. 2017. “Stan: A Probabilistic Programming Language.” Journal of Statistical Software 76: 1–32.
Chang, W. 2018. Web Application Framework for r: Package Shiny. R Studio. http://shiny.rstudio.com/.
Karabatsos, G. 2016. “A Menu-Driven Software Package of Bayesian Nonparametric (and Parametric) Mixed Models for Regression Analysis and Density Estimation.” Behavior Research Methods 49: 335–62.
R Core Team. 2023. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Stan Development Team. 2017. “Shinystan: Interactive Visual and Numerical Diagnostics and Posterior Analysis for Bayesian Models.” http://mc-stan.org/.
Woodward, P. 2005. “BugsXLA: Bayes for the Common Man.” Journal of Statistical Software 14 (5): 1–18.

  1. Bayesian Econometrics: Simulations, Models, and Applications to Research, Teaching, and Encoding with Responsibility.↩︎