Package: glmbayes 0.9.5

Kjell Nygren

glmbayes: Bayesian Generalized Linear Models (IID Samples)

Provides Bayesian linear and generalized linear model fitting with independent and identically distributed (iid) posterior samples. The main functions mirror R's lm() and glm() interfaces while adding prior family specifications for Gaussian, Poisson, binomial, and Gamma models with log-concave likelihoods. Sampling for supported non-conjugate models uses accept-reject methods based on likelihood subgradients as in Nygren and Nygren (2006) <doi:10.1198/016214506000000357>. The package also includes tools for prior setup, posterior summaries, prediction, diagnostics, simulation, vignettes, and optional 'OpenCL' acceleration for larger models.

Authors:Kjell Nygren [aut, cre], The R Core Team [ctb, cph], The R Foundation [cph], Ross Ihaka [ctb, cph], Robert Gentleman [ctb, cph], Simon Davies [ctb], Morten Welinder [ctb, cph], Martin Maechler [ctb]

glmbayes_0.9.5.tar.gz
glmbayes_0.9.5.tar.gz(r-4.7-arm64)glmbayes_0.9.5.tar.gz(r-4.7-x86_64)glmbayes_0.9.5.tar.gz(r-4.6-arm64)glmbayes_0.9.5.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
card.svg |card.png
glmbayes/json (API)
NEWS

# Install 'glmbayes' in R:
install.packages('glmbayes', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/knygren/glmbayes/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • AMI - Amitriptyline overdose data
  • BikeSharing - Bike Sharing Dataset
  • Boston_centered - Boston housing data with mean-centered predictors
  • carinsca - Canadian Automobile Insurance Claims for 1957-1958
  • Cleveland - Cleveland Heart Disease Dataset

On CRAN:

Conda:

openblascpp

5.54 score 1 packages 43 scripts 541 downloads 58 exports 8 dependencies

Last updated from:24fde0e870. Checks:5 OK, 1 FAIL. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK308
linux-devel-x86_64OK277
source / vignettesOK507
linux-release-arm64OK315
linux-release-x86_64OK437
wasm-releaseFAIL242

Exports:add_to_libpath_linuxadd_to_path_linuxadd_to_path_windowscheck_runtime_envcompute_gaussian_priordetect_compute_runtimesdetect_environment_and_gpusdetect_or_install_gpu_driversdGammadiagnose_glmbayesdIndependent_Normal_Gammadirectional_taildNormaldNormal_GammaEnvelopeBuildEnvelopeCenteringEnvelopeDispersionBuildEnvelopeEvalEnvelopeOptEnvelopeOrchestratorEnvelopeSetGridEnvelopeSetLogPEnvelopeSizeEnvelopeSortextractDICget_opencl_core_countglmbglmb_Standardize_Modelglmb.covratioglmb.dffitsglmb.influence.measuresglmb.wfitglmbfamfuncgpu_nameshas_opencllmbload_kernel_libraryload_kernel_sourcepfamilypinvgamma_ctpnorm_ctPrior_CheckPrior_Setupqinvgamma_ctrgamma_ctrGamma_regrglmbrindepNormalGamma_regrIndepNormalGammaReg_stdrinvgamma_ctrlmbrnorm_ctrNormal_regrNormal_reg.wfitrNormalGamma_regrNormalGLM_stdsimfunctionverify_opencl_runtime

Dependencies:codalatticeMASSrbibutilsRcppRcppArmadilloRcppParallelRdpack

Chapter 00: Introduction

Rendered fromChapter-00.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 01: Getting started with glmbayes

Rendered fromChapter-01.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-18
Started: 2026-05-04

Chapter 02: Estimating Bayesian Linear Models

Rendered fromChapter-02.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 03: Tailoring Priors - Leveraging the Prior_Setup Function

Rendered fromChapter-03.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 04: Reviewing Model Predictions, Deviance Residuals and Model Statistics

Rendered fromChapter-04.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 05: Foundations of GLMs – Families, Links, and Log-Concave Likelihoods

Rendered fromChapter-05.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 06: Estimating Bayesian Generalized Linear Models

Rendered fromChapter-06.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 07: Models for the Binomial Family

Rendered fromChapter-07.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 08: Models for the Poisson Family

Rendered fromChapter-08.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 09: Models for the Gamma Family

Rendered fromChapter-09.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 10: Informative Priors: Centering and priors with differential prior weights

Rendered fromChapter-10.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 11: Estimating Models with unknown dispersion parameters

Rendered fromChapter-11.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 12: Large Models: GPU Acceleration using OpenCL

Rendered fromChapter-12.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-18
Started: 2026-05-04

Chapter 13: Hierarchical Linear Models

Rendered fromChapter-13.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter 14: Hierarchical Generalized Linear Models

Rendered fromChapter-14.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A01: A detailed overview of the glmbayes package

Rendered fromChapter-A01.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A02: Overview of Estimation Procedures

Rendered fromChapter-A02.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A03: Methods available in glmbayes

Rendered fromChapter-A03.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A04: Directional Tail Diagnostics for Prior-Posterior Disagreement

Rendered fromChapter-A04.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A05: Simulation Methods - Likelihood Subgradient Densities

Rendered fromChapter-A05.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A06: Accept–Reject Sampling for Dispersion in Gamma Regression

Rendered fromChapter-A06.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A07: Accept–Reject Sampling for gaussian Regression models with independent normal-gamma priors

Rendered fromChapter-A07.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A08: Overview of Envelope Related Functions

Rendered fromChapter-A08.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A09: Parallel Sampling Implementation using RcppParallel

Rendered fromChapter-A09.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A10: Accelerated EnvelopeBuild Implementation using OpenCL

Rendered fromChapter-A10.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A11: Implementation Companion for Independent Normal-Gamma

Rendered fromChapter-A11.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Chapter A12: Technical Derivations for Priors Returned by `Prior_Setup()

Rendered fromChapter-A12.Rmdusingknitr::rmarkdownon Jun 17 2026.

Last update: 2026-05-04
Started: 2026-05-04

Readme and manuals

Help Manual

Help pageTopics
glmbayes: Bayesian Generalized Linear Models with iid Samplingglmbayes-package glmbayes
Add Directories to PATH or LD_LIBRARY_PATHadd_to_libpath_linux add_to_path add_to_path_linux add_to_path_windows
Amitriptyline overdose dataAMI
Analysis of Deviance for Bayesian Generalized Linear Model Fitsanova.glmb
Bike Sharing Dataset (Processed)BikeSharing
Boston housing data with mean-centered predictorsBoston_centered
Canadian Automobile Insurance Claims for 1957-1958carinsca
Case and Variable Names of Fitted Modelscase.names.glmb variable.names.glmb
Cleveland Heart Disease DatasetCleveland
Compute Calibrated Gaussian Normal–Gamma Prior Componentscompute_gaussian_prior
Credible Intervals for Model Parametersconfint.glmb
Model Deviancedeviance.rglmb
GPU and OpenCL Diagnostics for glmbayescheck_runtime_env detect_compute_runtimes detect_environment_and_gpus detect_or_install_gpu_drivers diagnose_glmbayes gpu_diagnostics gpu_names has_opencl verify_opencl_runtime
Directional Tail Diagnosticdirectional_tail print.directional_tail
Extract Coefficients in Original Codingdummy.coef.glmb print.dummy_coef.glmb
GPU-Accelerated Envelope Construction for Posterior SimulationEnvelopeBuild EnvelopeSetGrid EnvelopeSetLogP
Envelope Centering for Bayesian Gaussian RegressionEnvelopeCentering
Builds Dispersion-Aware Envelope for SimulationEnvelopeDispersionBuild
Evaluate Negative Log-Likelihood and GradientsEnvelopeEval
Envelope Construction Orchestrator for Bayesian Gaussian RegressionEnvelopeOrchestrator
Envelope Sizing and OptimizationEnvelopeOpt EnvelopeSize
Sorts Envelope function for simulationEnvelopeSort
Extract DIC from a Fitted Bayesian ModelextractAIC.glmb extractAIC.rglmb extractDIC
Model Formulaeformula.summary.rglmb
The Central Gamma Distributionctrgamma Gamma_ct pgamma_ct rgamma_ct
Get the number of available OpenCL compute unitsget_opencl_core_count
Fitting Bayesian Generalized Linear Modelsglmb print.glmb
Standardize A Non-Gaussian Modelglmb_Standardize_Model
Bayesian Regression Diagnosticscooks.distance.glmb dfbetas.glmb glmb.covratio glmb.dffits glmb.influence.measures rstandard.glmb rstudent.glmb
Return family functions used during simulation and post processingglmbfamfunc print.glmbfamfunc
Bayesian Regression Diagnosticsinfluence.glmb
The Central Inverse-Gamma DistributionInvGamma_ct pinvgamma_ct qinvgamma_ct rinvgamma_ct
Fitting Bayesian Linear Modelslmb print.lmb
Load OpenCL Kernel Source Filesload_kernel_library load_kernel_source
Extract Log-LikelihoodlogLik.glmb
The Central Normal DistributionNormal_ct pnorm_ct rnorm_ct
Prior Family Objects for Bayesian ModelsdGamma dIndependent_Normal_Gamma dNormal dNormal_Gamma pfamily print.pfamily
Plot posterior draws for objects of class 'glmb'.plot.glmb
Predict Method for Bayesian GLM Fitspredict.glmb
Checks for Prior-data conflictsPrior_Check
Setup Prior Objectsprint.PriorSetup Prior_Setup
Accessing Bayesian Generalized Linear Model Fitsresiduals.glmb residuals.lmb residuals.rglmb
The Bayesian Generalized Linear Model Distributionprint.rglmb rglmb
The Bayesian Gaussian Regression with Independent Normal-Gamma Prior in Standard FormrIndepNormalGammaReg_std
The Bayesian Linear Model Distributionprint.rlmb rlmb
Bayesian Weighted Fitting Enginesglmb.wfit rNormal_reg.wfit
The Bayesian Generalized Linear Model Distribution in Standard FormrNormalGLM_std
Simulation Functions for Bayesian Generalized Linear Modelsprint.rGamma_reg print.simfunction rGamma_reg rindepNormalGamma_reg rNormalGamma_reg rNormal_reg simfuncs simfunction
Simulate Responsessimulate.glmb
Low-Level Simulation Pipeline for Bayesian GLMsSimulationPipeline
Summarizing Bayesian Generalized Linear Model Fitsprint.summary.glmb summary.glmb
Summarizing Bayesian gamma_reg Distribution Functionsprint.summary.rGamma_reg summary.rGamma_reg
Summarizing Bayesian Generalized Linear Model Distribution Functionsprint.summary.rglmb summary.rglmb
Calculate Variance-Covariance Matrix for a Fitted Model Objectvcov.glmb