Chapter 00: Introduction

library(glmbayes)
#> Loading required package: MASS

Chapter 00: Introduction

This vignette introduces glmbayes, a package for fitting Bayesian generalized linear models via efficient envelope-based sampling. The vignette series is organized into five main parts and a set of technical appendices. You will move from basic installation and first models, through linear and generalized linear models, to advanced prior structures, dispersion modeling, and GPU-accelerated computation. The appendices document the underlying simulation methods and implementation details. The envelope sampling methodology builds on the likelihood subgradient framework of (Nygren and Nygren 2006).

Part 1: An Introduction

These chapters provide a high-level overview of the package, its design philosophy, and the basic workflow for fitting Bayesian linear and generalized linear models.

Part 2: Estimating Bayesian Linear Models

This part focuses on Bayesian linear regression under the Gaussian family and identity link. It establishes the foundational ideas in a setting where exact multivariate normal posteriors are available.

Part 3: Generalized Linear Models

This part presents Bayesian GLMs across the major likelihood families, including Binomial, quasi-Binomial, Poisson, quasi-Poisson, and Gamma models. It emphasizes link functions, log-concavity, and practical posterior interpretation.

Part 4: Advanced Topics

These chapters explore more complex modeling scenarios and computational strategies, including informative priors, unknown dispersion parameters, hierarchical (random effects) models, and GPU-accelerated envelope construction.

  • Chapter 10 - Informative Priors: Centering and priors with differential prior weights
    Construct more flexible priors by centering on domain-specific values and assigning variable-specific scales. Examine how differentiated prior weights influence shrinkage and interpretability.
    https://knygren.r-universe.dev/articles/glmbayes/Chapter-10.html

  • Chapter 11 - Estimating Models with Unknown Dispersion Parameters
    Extend envelope-based methods to models with unknown dispersion (e.g., Gamma and quasi-families). Use dedicated dispersion samplers to obtain joint posterior draws and quantify overdispersion uncertainty.
    https://knygren.r-universe.dev/articles/glmbayes/Chapter-11.html

  • Chapter 12 - Large Models: GPU Acceleration using OpenCL
    Scale Bayesian GLMs to higher-dimensional settings by offloading key computations to the GPU. Configure OpenCL, tune envelope construction for large models, and benchmark performance gains.
    https://knygren.r-universe.dev/articles/glmbayes/Chapter-12.html

  • Chapter 13 - Hierarchical Linear Models
    Fit hierarchical (random effects) linear models using block Gibbs sampling with rlmb. Covers dispersion-and-coefficients sampling (e.g., Dobson plant weight) and the Eight Schools example with conjugate and non-conjugate priors.
    https://knygren.r-universe.dev/articles/glmbayes/Chapter-13.html

  • Chapter 14 - Hierarchical Generalized Linear Models
    Extend hierarchical modeling to non-Gaussian families. Implements a two-block Gibbs sampler for Poisson regression with observation-level random effects using the BikeSharing dataset and rglmb.
    https://knygren.r-universe.dev/articles/glmbayes/Chapter-14.html

Part 5: Simulation Methods and Technical Implementation

The appendices document the mathematical and algorithmic foundations of the samplers used in glmbayes, including likelihood subgradient methods, envelope construction, and accept-reject schemes for both regression and dispersion parameters.


Together, these chapters and appendices form a coherent progression: from basic usage and model specification, through applied Bayesian GLMs, to the mathematical and computational details that underlie the envelope-based samplers and GPU-accelerated implementations in glmbayes.

References

Nygren, K. N., and L. M. Nygren. 2006. Likelihood Subgradient Densities.” Journal of the American Statistical Association 101 (475): 1144–56. https://doi.org/10.1198/016214506000000357.