vix.ing · top · new · best · stats · spec

Variational Inference for Shrinkage Priors: The R package vir

2021/02/17 by Suchit Mehrotra, Mehrotra, Suchit, Arnab K. Maity +1
Computer Science · Mathematics · #Computation (stat.CO) #FOS: Computer and information sciences #Gaussian Processes and Bayesian Inference #Machine Learning and Algorithms #Statistical Methods and Inference

paper · pdf · doi:10.48550/arxiv.2102.08877

openalex publication_date 2021/02/17 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

We present vir, an R package for variational inference with shrinkage priors. Our package implements variational and stochastic variational algorithms for linear and probit regression models, the use of which is a common first step in many applied analyses. We review variational inference and show how the derivation for a Gibbs sampler can be easily modified to derive a corresponding variational or stochastic variational algorithm. We provide simulations showing that, at least for a normal linear model, variational inference can lead to similar uncertainty quantification as the corresponding Gibbs samplers, while estimating the model parameters at a fraction of the computational cost. Our timing experiments show situations in which our algorithms converge faster than the frequentist LASSO implementations in glmnet while simultaneously providing superior parameter estimation and variable selection. Hence, our package can be utilized to quickly explore different combinations of predictors in a linear model, while providing accurate uncertainty quantification in many applied situations. The package is implemented natively in R and RcppEigen, which has the benefit of bypassing the substantial operating system specific overhead of linking external libraries to work efficiently with R.

Citations

Related