bamlss: A Lego Toolbox for Flexible Bayesian Regression (and Beyond)

Over the last decades, the challenges in applied regression and in predictive modeling have been changing considerably: (1) More flexible model specifications are needed as big(ger) data become available, facilitated by more powerful computing infrastructure. (2) Full probabilistic modeling rather than predicting just means or expectations is crucial in many applications. (3) Interest in Bayesian inference has been increasing both as an appealing framework for regularizing or penalizing model estimation as well as a natural alternative to classical frequentist inference. However, while there has been a lot of research in all three areas, also leading to associated software packages, a modular software implementation that allows to easily combine all three aspects has not yet been available. For filling this gap, the R package bamlss is introduced for Bayesian additive models for location, scale, and shape (and beyond). At the core of the package are algorithms for highly-efficient Bayesian estimation and inference that can be applied to generalized additive models (GAMs) or generalized additive models for location, scale, and shape (GAMLSS), also known as distributional regression. However, its building blocks are designed as "Lego bricks" encompassing various distributions (exponential family, Cox, joint models, ...), regression terms (linear, splines, random effects, tensor products, spatial fields, ...), and estimators (MCMC, backfitting, gradient boosting, lasso, ...). It is demonstrated how these can be easily recombined to make classical models more flexible or create new custom models for specific modeling challenges.

[1]  Gordon K. Smyth,et al.  Partitioned algorithms for maximum likelihood and other non-linear estimation , 1996, Stat. Comput..

[2]  Achim Zeileis,et al.  Applied Econometrics with R , 2008 .

[3]  A. Gelman Prior distributions for variance parameters in hierarchical models (comment on article by Browne and Draper) , 2004 .

[4]  D. Rubin,et al.  Inference from Iterative Simulation Using Multiple Sequences , 1992 .

[5]  M. Plummer,et al.  CODA: convergence diagnosis and output analysis for MCMC , 2006 .

[6]  H. Rue,et al.  Spatial Data Analysis with R-INLA with Some Extensions , 2015 .

[7]  Jiqiang Guo,et al.  Stan: A Probabilistic Programming Language. , 2017, Journal of statistical software.

[8]  A. Raftery,et al.  Probabilistic forecasts, calibration and sharpness , 2007 .

[9]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[10]  Achim Zeileis,et al.  Probabilistic Forecasting of Thunderstorms in the Eastern Alps , 2018, Monthly Weather Review.

[11]  Alexander Jordan,et al.  Evaluating Probabilistic Forecasts with scoringRules , 2017, Journal of Statistical Software.

[12]  Achim Zeileis,et al.  NWP-based lightning prediction using flexible count data regression , 2019, Advances in Statistical Climatology, Meteorology and Oceanography.

[13]  A Fouillet,et al.  Has the impact of heat waves on mortality changed in France since the European heat wave of summer 2003? A study of the 2006 heat wave. , 2008, International journal of epidemiology.

[14]  Dani Gamerman,et al.  Sampling from the posterior distribution in generalized linear mixed models , 1997, Stat. Comput..

[15]  Philip Heidelberger,et al.  A spectral method for confidence interval generation and run length control in simulations , 1981, CACM.

[16]  Finn Lindgren,et al.  Bayesian Spatial Modelling with R-INLA , 2015 .

[17]  Nikolaus Umlauf,et al.  A primer on Bayesian distributional regression , 2018 .

[18]  Achim Zeileis,et al.  BAMLSS: Bayesian Additive Models for Location, Scale, and Shape (and Beyond) , 2018, Journal of Computational and Graphical Statistics.

[19]  Peter K. Dunn,et al.  Randomized Quantile Residuals , 1996 .

[20]  G. Heller,et al.  Flexible Regression and Smoothing: Using Gamlss in R , 2017 .

[21]  James G. Scott,et al.  On the half-cauchy prior for a global scale parameter , 2011, 1104.4937.

[22]  J. Thepaut,et al.  The ERA5 global reanalysis , 2020, Quarterly Journal of the Royal Meteorological Society.

[23]  M. Aitkin Modelling variance heterogeneity in normal regression using GLIM , 1987 .

[24]  Edzer Pebesma,et al.  Simple Features for R: Standardized Support for Spatial Vector Data , 2018, R J..

[25]  Nadja Klein,et al.  Simultaneous inference in structured additive conditional copula regression models: a unifying Bayesian approach , 2016, Stat. Comput..

[26]  P. McCullagh,et al.  Generalized Linear Models , 1984 .

[27]  P. McCullagh,et al.  Generalized Linear Models , 1972, Predictive Analytics.

[28]  Nikolaus Umlauf,et al.  Nonlinear association structures in flexible Bayesian additive joint models , 2017, Statistics in medicine.

[29]  T. Kneib S01.1: Penalized structured additive regression for space-time data , 2004 .

[30]  H. Fowler,et al.  Future changes to the intensity and frequency of short‐duration extreme rainfall , 2014 .

[31]  Simon N Wood,et al.  Just Another Gibbs Additive Modeler: Interfacing JAGS and mgcv , 2016, 1602.02539.

[32]  Nadja Klein,et al.  Bayesian structured additive distributional regression with an application to regional income inequality in Germany , 2015, 1509.05230.

[33]  Ludwig Fahrmeir,et al.  Regression: Models, Methods and Applications , 2013 .

[34]  A. Zeileis,et al.  Regression Models for Count Data in R , 2008 .

[35]  Simon N. Wood,et al.  Generalized Additive Models for Gigadata: Modeling the U.K. Black Smoke Network Daily Data , 2017 .

[36]  Andrew Thomas,et al.  WinBUGS - A Bayesian modelling framework: Concepts, structure, and extensibility , 2000, Stat. Comput..

[37]  Andrew Thomas,et al.  MultiBUGS: A Parallel Implementation of the BUGS Modeling Framework for Faster Bayesian Inference , 2017, J. Stat. Softw..

[38]  Gillian Z. Heller,et al.  Distributions for Modeling Location, Scale, and Shape , 2019 .

[39]  Bradley P. Carlin,et al.  Bayesian measures of model complexity and fit , 2002 .

[40]  Radford M. Neal Slice Sampling , 2003, The Annals of Statistics.

[41]  S. Wood,et al.  Smoothing Parameter and Model Selection for General Smooth Models , 2015, 1511.03864.

[42]  M. Gerfin Parametric and semi‐parametric estimation of the binary response model of labour market participation , 1996 .

[43]  Achim Zeileis,et al.  Visualizing Count Data Regressions Using Rootograms , 2016, 1605.01311.

[44]  Achim Zeileis,et al.  R Package Distribution of the BayesX C++ Sources , 2013 .

[45]  A. Zeileis,et al.  Extended Model Formulas in R : Multiple Parts and Multiple Responses , 2010 .

[46]  T. Kneib,et al.  BayesX: Analyzing Bayesian Structural Additive Regression Models , 2005 .

[47]  Martyn Plummer,et al.  JAGS: A program for analysis of Bayesian graphical models using Gibbs sampling , 2003 .

[48]  N. Lazar,et al.  The ASA Statement on p-Values: Context, Process, and Purpose , 2016 .

[49]  Trevor Hastie,et al.  Regularization Paths for Generalized Linear Models via Coordinate Descent. , 2010, Journal of statistical software.

[50]  Nikolaus Umlauf,et al.  Flexible Bayesian additive joint models with an application to type 1 diabetes research , 2016, Biometrical journal. Biometrische Zeitschrift.

[51]  R. Tibshirani,et al.  Generalized Additive Models , 1991 .

[52]  Benjamin Hofner,et al.  gamboostLSS: An R Package for Model Building and Variable Selection in the GAMLSS Framework , 2014, 1407.1774.

[53]  Andrew Gelman,et al.  General methods for monitoring convergence of iterative simulations , 1998 .

[54]  Andreas Brezger,et al.  Generalized structured additive regression based on Bayesian P-splines , 2006, Comput. Stat. Data Anal..

[55]  A. Raftery,et al.  Strictly Proper Scoring Rules, Prediction, and Estimation , 2007 .

[56]  L. Smeeth,et al.  COVID-19: a need for real-time monitoring of weekly excess deaths , 2020, The Lancet.

[57]  Pravin K. Trivedi,et al.  Regression Analysis of Count Data: Preface , 1998 .

[58]  Sumio Watanabe,et al.  Asymptotic Equivalence of Bayes Cross Validation and Widely Applicable Information Criterion in Singular Learning Theory , 2010, J. Mach. Learn. Res..

[59]  Achim Zeileis,et al.  Structured Additive Regression Models: An R Interface to BayesX , 2015 .

[60]  Nadja Klein,et al.  Bayesian structured additive distributional regression for multivariate responses , 2015 .

[61]  Nadja Klein,et al.  Scale-Dependent Priors for Variance Parameters in Structured Additive Distributional Regression , 2016 .

[62]  Cedric E. Ginestet ggplot2: Elegant Graphics for Data Analysis , 2011 .

[63]  C. Strumann,et al.  Modelling Hospital Admission and Length of Stay by Means of Generalised Count Data Models , 2016 .

[64]  R. Rigby,et al.  Generalized Additive Models for Location Scale and Shape (GAMLSS) in R , 2007 .

[65]  R. Rigby,et al.  Generalized additive models for location, scale and shape , 2005 .

[66]  Gerhard Diendorfer,et al.  Cloud-to-ground lightning in Austria : a 10-year study using data from a lightning location system , 2005 .

[67]  Michel Denuit,et al.  Nonlife ratemaking and risk management with Bayesian generalized additive models for location, scale, and shape , 2014 .

[68]  Clifford M. Hurvich,et al.  Regression and time series model selection in small samples , 1989 .

[69]  julien Hambuckers,et al.  LASSO-type penalization in the framework of generalized additive models for location, scale and shape , 2019, Comput. Stat. Data Anal..

[70]  Stefan Lang,et al.  For a list of recent papers see the backpages of this paper. Multilevel , 2022 .

[71]  B. Silverman,et al.  Some Aspects of the Spline Smoothing Approach to Non‐Parametric Regression Curve Fitting , 1985 .

[72]  Nadja Klein,et al.  Bayesian Generalized Additive Models for Location, Scale, and Shape for Zero-Inflated and Overdispersed Count Data , 2015 .

[73]  H. Rue,et al.  Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations , 2009 .

[74]  S van Buuren,et al.  Worm plot: a simple diagnostic device for modelling growth reference curves , 2001, Statistics in medicine.

[75]  Benjamin Hofner,et al.  Generalized additive models for location, scale and shape for high dimensional data—a flexible approach based on boosting , 2012 .

[76]  Kurt Hornik,et al.  colorspace: A Toolbox for Manipulating and Assessing Colors and Palettes , 2019, J. Stat. Softw..

[77]  Paul-Christian Bürkner,et al.  brms: An R Package for Bayesian Multilevel Models Using Stan , 2017 .

[78]  L. Fahrmeir,et al.  PENALIZED STRUCTURED ADDITIVE REGRESSION FOR SPACE-TIME DATA: A BAYESIAN PERSPECTIVE , 2004 .

[79]  T. Yee The VGAM Package for Categorical Data Analysis , 2010 .

[80]  S. Wood Generalized Additive Models: An Introduction with R , 2006 .

[81]  Trevor Hastie,et al.  Statistical Models in S , 1991 .

[82]  Philip Heidelberger,et al.  Simulation Run Length Control in the Presence of an Initial Transient , 1983, Oper. Res..