This repository contains the code and data for a paper proposing diagnostic methods for bridgesampling. The experiments are divided into two main parts: analysis using posterior distributions from the posteriorDB project and a toy example exploring the effects of increasing the number of covariates in a generalized linear model (GLM).
posteriordb/: Contains the main experiments that apply bridgesampling to various posterior distributions curated from theposteriorDB. This folder includes both R scripts and Stan models that are essential for replicating the findings and further exploration.toy_example/: Includes experiments designed to study the impact of an increasing number of covariates in a GLM on the efficiency and accuracy of the bridgesampling method. This section is helpful for understanding scalability and performance in simpler, controlled scenarios.
- R files: Scripts for setting up the statistical models, executing the bridgesampling algorithm, and processing the results.
- Stan files: Stan models used to define the Bayesian models whose posteriors are being explored.
- Data files: Data files used in the experiments, stored in csv format.
Ensure you have the following software and libraries installed:
- R (version 4.0 or higher)
- RStan (version 2.21 or higher)
- bridgesampling package in R
- CmdstanR (bridgesampling version)
Clone the repository to your local machine using:
git clone https://github.com/GiorgioMB/bridgesampling_paper_code.git
cd bridgesampling_paper_codeNavigate to either of the experiment directories and run the R scripts provided. For example:
cd posteriordb
Rscript low_dim_gauss_mix.RThis will execute the analysis using the predefined model and data from posteriorDB.
For any queries related to the repository, please contact: