v1.0.0 — Initial Release
This is the first stable release of bayesianICSimulations, developed as part of an MSc Biostatistics dissertation at Stellenbosch University.
What this package does
Implements a large-scale simulation study comparing two Bayesian MCMC samplers for fitting log-logistic AFT models to interval-censored survival data with survey weights:
- HMC via Stan / CmdStanR
- Metropolis-Hastings via JAGS / rjags
The study covers 5,400 simulated datasets across three sample sizes (n = 200, 2,000, 10,000) and evaluates sampler performance under the ADEMP framework (bias, RMSE, coverage,
computational efficiency).
Included
Model fitting
- fit_logistic_hmc() — HMC fitting with Stan; 4 parallel chains, reproducible seed, standardized output
- fit_logistic_mh() — MH fitting with JAGS; zeros trick weighted likelihood, reproducible per-dataset seeds
Analysis pipeline
- combine_results() — Aggregates thousands of .rds outputs; parses filenames, computes error metrics, flags convergence
- perform_statistical_analysis() — ADEMP-framework analysis: bias, RMSE, coverage, CI width, all with Monte Carlo standard errors
- mcse_mean(), mcse_prop(), calc_bias_rmse(), cohen_d() — MCSE and effect size utilities
Visualisation (13 figures)
- R-hat ECDFs, ESS ridge plots, coverage plots, bias/RMSE comparisons, ESS-per-second, runtime, posterior means agreement, credible interval matrices
HPC support
- PBS job array scripts for Stellenbosch University cluster
- One-time setup script (installs JAGS from source, CmdStan, all R dependencies)
- Supports 10,800 model fits in parallel
Real-data application
- ZIMPHIA (Zimbabwe Population-based HIV Impact Assessment) analysis functions and tables
Requirements
- R ≥ 4.0.0
- CmdStan (via cmdstanr::install_cmdstan())
- JAGS 4.x (brew install jags / apt-get install jags)
▎ Developed as part of an MSc Biostatistics research project, Stellenbosch University, 2025.