Abstract
The LatentBMA R package provides a robust framework for Bayesian Model Averaging (BMA) within Univariate Link Latent Gaussian Models (ULLGMs). By addressing model uncertainty in complex non-linear regressions—specifically Poisson log-normal (PLN) and binomial logistic-normal (BiL) models—the package allows researchers to move beyond single-model selection. This paper outlines the package's implementation of g-priors, MCMC estimation, and its suite of visualization tools designed to communicate posterior uncertainty effectively.
Introduction: The Challenge of Model Uncertainty
In empirical research, the selection of explanatory variables is rarely certain. Standard statistical practices often involve selecting a single "best" model based on criteria like AIC or BIC. However, this approach ignores model uncertainty, potentially leading to overconfident inferences and biased results. Bayesian Model Averaging (BMA) offers a principled alternative by averaging over the entire model space, weighting each model by its posterior probability.
While BMA is well-established for linear models, its application to Latent Gaussian Models (LGMs)—essential for count and binary data—is computationally demanding. LatentBMA implements the theoretical framework developed by Steel and Zens (2024) to bring these advanced techniques to practitioners.
Methods and Implementation
The core of the package is the ULLGM_BMA function, which utilizes Markov Chain Monte Carlo (MCMC) sampling to explore the model space. It currently supports two primary likelihoods:
- Poisson log-normal (PLN): For count data with latent effects.
- Binomial logistic-normal (BiL): For binary or proportion data.
The package offers significant flexibility in prior specification. It supports a variety of g-priors for coefficients (e.g., BRIC, UIP, Zellner-Siow, hyper-g) and a beta-binomial prior on the model space, which allows users to incorporate prior knowledge about the expected number of relevant variables.
Visualizing and Summarizing Results
A key strength of LatentBMA is its integrated suite of functions that transform complex MCMC outputs into intuitive visualizations and tables. These tools help researchers identify which variables are most influential and which specific model configurations carry the most posterior weight.
Beyond point estimates, the package emphasizes variable importance through Posterior Inclusion Probabilities (PIPs). PIPs represent the probability that a specific variable is included in the "true" model, offering a more nuanced view than traditional p-values. The package also provides comprehensive summary tables to facilitate reporting.
Conclusion and Future Directions
LatentBMA provides an accessible entry point for researchers to apply BMA to non-linear latent models. Its modular design ensures that it can be extended to include additional likelihoods (such as Gamma or Negative Binomial) and link functions in the future. By automating variable demeaning and providing dedicated visualization functions, the package streamlines the workflow for rigorous Bayesian analysis in the presence of model uncertainty.
Summary updated