SoftwareX (Dec 2022)
The bayesvl package: An R package for implementing and visualizing Bayesian statistics
Abstract
The bayesvl R package implements Bayesian analysis using the Stan’s no-U-turn sampler (NUTS). Two distinguished functions that the bayesvl package complements to other developed packages and software performing Bayesian analysis are the “relationship tree” construction protocol and the ability to visualize estimated posteriors graphically. The “relationship tree” construction protocol is inspired by the Bayesian network approach that illustrates the model through directed acyclic graphs (DAGs), while the graphical visualization capability of the bayesvl package is built upon the graphical generation power of the ggplot2 package. After constructing a “relationship tree”, the posterior can be automatically simulated and graphically visualized with some simple codes. With two distinctive characteristics, the bayesvl package’s main aims are to improve user experience (chance of creativity and serendipity; productivity, flexibility and intuitiveness; and scientific communication power) and pedagogical effectiveness in statistics and other sciences (cognitive instruction strategy; analytical reasoning and argument understanding skills; and idea exchange between social sciences and mathematical education).