Mhorseshoe package in R: Approximate algorithm for the horseshoe prior in Bayesian linear model - Kang, Mingi; Lee, Kyoungjae (SoftwareX, 2025)
The horseshoe prior is a continuous shrinkage prior frequently used in high-dimensional Bayesian sparse linear regression models. Although the horseshoe prior theoretically guarantees excellent shrinkage properties, performing a Markov Chain Monte Carlo (MCMC) algorithm incurs high computational costs per iteration. We introduce the Mhorseshoe package in R, which implements posterior inference under the horseshoe prior, based on the exact and approximate algorithms proposed in Johndrow et al. (2020). Furthermore, this package incorporates a novel adaptive selection method, which we developed and implemented to determine the tuning parameter in the approximate algorithm. We conducted a simulation study and confirmed that the algorithm can be effectively applied to large datasets.