[Paper Review] spikeSlabGAM: Bayesian Variable Selection, Model Choice and Regularization for Generalized Additive Mixed Models in R
This paper introduces the R package spikeSlabGAM, which enables Bayesian variable selection, model choice, and regularization in generalized additive mixed models (GAMMs) for Gaussian, binomial, and Poisson responses. It uses a novel spike-and-slab prior on coefficient groups to simultaneously select relevant covariates, determine whether their effects are linear or smooth, and estimate their functional forms, achieving stable inference even in high-dimensional settings with thousands of observations and hundreds of coefficients.
The R package spikeSlabGAM implements Bayesian variable selection, model choice, and regularized estimation in (geo-)additive mixed models for Gaussian, binomial, and Poisson responses. Its purpose is to (1) choose an appropriate subset of potential covariates and their interactions, (2) to determine whether linear or more flexible functional forms are required to model the effects of the respective covariates, and (3) to estimate their shapes. Selection and regularization of the model terms is based on a novel spike-and-slab-type prior on coefficient groups associated with parametric and semi-parametric effects.
Motivation & Objective
- To address the challenge of selecting relevant covariates and determining appropriate functional forms (linear vs. smooth) in high-dimensional generalized additive mixed models.
- To develop a fully Bayesian framework that enables joint estimation, model selection, and regularization across diverse model terms, including linear, smooth, random, and spatial effects.
- To extend spike-and-slab priors beyond single coefficients to blocks of coefficients associated with model terms, enabling term-level selection.
- To provide a scalable, open-source R implementation that supports model averaging, visualization, and prediction for non-Gaussian responses.
- To distinguish between linear and nonlinear effects while performing variable selection and regularization in a unified Bayesian framework.
Proposed method
- Uses a spike-and-slab prior structure on coefficient groups associated with model terms, where the spike component represents exclusion from the model and the slab represents inclusion with flexible estimation.
- Applies bimodal priors on hyper-variances of regression coefficients, resulting in a two-component mixture that enables marginal posterior probabilities of inclusion for each model term.
- Employs Markov Chain Monte Carlo (MCMC) sampling with P-splines for smooth term estimation and conditional Gaussian priors for regularized estimation of various effects (linear, smooth, random, spatial).
- Implements a P-IWLS (penalized iteratively reweighted least squares) MCMC algorithm with thinning and multiple parallel chains to improve convergence and stability.
- Supports model specification via standard R formula syntax, allowing flexible inclusion of main effects, interactions, and complex terms like intrinsically Gaussian Markov random fields (IGMRF).
- Uses marginal posterior inclusion probabilities (P(gamma=1)) as a measure of term importance, with thresholds for significance (e.g., >0.25, >0.5, >0.9) to guide interpretation.
Experimental results
Research questions
- RQ1Can spike-and-slab priors be effectively extended to blocks of coefficients associated with model terms in GAMMs to enable joint variable and function selection?
- RQ2How well does the proposed Bayesian framework perform in selecting relevant covariates and distinguishing between linear and smooth effects in non-Gaussian response models?
- RQ3What is the impact of model averaging and regularization on predictive performance compared to standard GAMM approaches?
- RQ4How does the method scale in terms of computational efficiency and convergence stability with large datasets and high-dimensional coefficient spaces?
- RQ5Can the method reliably detect complex interactions while enforcing hierarchical constraints (e.g., excluding interactions if main effects are excluded)?
Key findings
- The package successfully identifies key predictors in the Pima Indian Diabetes dataset, with high posterior inclusion probabilities for glucose (1.000) and mass (1.000), indicating strong evidence for their inclusion as linear effects.
- Smooth effects for age and mass show high inclusion probabilities (0.996 and 0.973, respectively), suggesting strong nonlinear relationships with diabetes risk.
- The model achieves a predictive deviance of 177.85 on test data, slightly better than a baseline model (180.51), demonstrating improved predictive accuracy through informed variable and function selection.
- Marginal posterior inclusion probabilities for less important terms like pregnant and pressure are low (0.069 and 0.117), indicating they are unlikely to contribute significantly to the model.
- The method demonstrates scalability to datasets with thousands of observations and hundreds of coefficients, with stable inference requiring multiple parallel MCMC chains due to multi-modality in the posterior.
- The implementation supports a broad class of models, including Gaussian, binomial, Poisson, and piecewise exponential models, making it suitable for diverse regression problems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.