Bayesvl: An R package for user-friendly Bayesian regression modelling
Abstract
Compared with traditional statistics, only a few social scientists employ Bayesian analyses. The existing software programs for implementing Bayesian analyses such as OpenBUGS, WinBUGS, JAGS, and rstanarm can be daunting given that their complex computer codes involve a steep learning curve. In contrast, this paper introduces a new open software for implementing Bayesian network modelling and analysis: the bayesvl R package. The package aims at providing an intuitive gateway for beginners of Bayesian statistics to construct and analyse mathematical models in social sciences. To achieve this aim, the bayesvl package integrates three core functions seamlessly: (i) designing Bayesian network models using directed acyclic graphs (DAGs) of bnlearn, (ii) generating attractive visualization of ggplot2, and (iii) simulating data and computing posterior distribution using the Markov chain Monte Carlo (MCMC) algorithms of rstan and rethinking. A case example illustrates how the bayesvl package helps leverage users’ intuition in creating and evaluating mathematical models of their social scientific problems while minimizing the daunting aspect of writing complex computer codes.
Keywords:
Bayesian network, bayesvl, ggplot2, mathematical model, MCMCDOI:
https://doi.org/10.31276/VMOSTJOSSH.64(1).85-96Classification number
7
Downloads
Published
Received 5 October 2021; revised 28 December 2021; accepted 23 February 2022
How to Cite
Issue
Section
License
This work is licensed under a Attribution-NonCommercial-NoDerivatives 4.0 International