Package: lmebayes 0.1.0

lmebayes: Bayesian Linear Mixed-Effects Models via Two-Block Gibbs Sampling

Provides Bayesian linear and generalized linear mixed-effects model fitting with near-independent posterior samples. The main functions mirror the 'lme4' lmer() and glmer() interfaces (X/beta for fixed effects, Z/b for random effects, D for the random-effects covariance) while adding prior family specifications for Gaussian, Poisson, binomial, and Gamma models with log-concave likelihoods. Sampling uses efficient two-block Gibbs sampling procedures with parallel chains and theoretically driven stopping rules. Gibbs sampling engines are provided by the 'lmebayesCore' package.

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]

lmebayes_0.1.0.tar.gz
lmebayes_0.1.0.zip(r-4.7-x86_64)lmebayes_0.1.0.zip(r-4.7-arm64)lmebayes_0.1.0.zip(r-4.6-x86_64)lmebayes_0.1.0.zip(r-4.6-arm64)lmebayes_0.1.0.zip(r-4.5-x86_64)
lmebayes_0.1.0.tgz(r-4.6-x86_64)lmebayes_0.1.0.tgz(r-4.6-arm64)lmebayes_0.1.0.tgz(r-4.5-x86_64)lmebayes_0.1.0.tgz(r-4.5-arm64)
lmebayes_0.1.0.tar.gz(r-4.7-arm64)lmebayes_0.1.0.tar.gz(r-4.7-x86_64)lmebayes_0.1.0.tar.gz(r-4.6-arm64)lmebayes_0.1.0.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
lmebayes/json (API)

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

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

Uses libs:
  • 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:

cpp

5.79 score 23 exports 75 dependencies

Last updated from:9447cd81ea. Checks:14 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK230
linux-devel-x86_64OK296
source / vignettesOK355
linux-release-arm64OK253
linux-release-x86_64OK328
macos-release-arm64OK169
macos-release-x86_64OK469
macos-oldrel-arm64OK198
macos-oldrel-x86_64OK323
windows-devel-arm64OK323
windows-devel-x86_64OK282
windows-release-arm64OK341
windows-release-x86_64OK292
windows-oldrel-x86_64OK232
wasm-releaseFAIL157

Exports:dGammadGamma_listdIndependent_Normal_Gammadirectional_taildNormaldNormal_GammaglmbglmbBlockglmerbhas_opencllmblmbBlocklmerbmodel_setuppfamily_listplot_mean_convergenceplot_var_convergencePrior_SetupPrior_Setup_GLMMPrior_SetupGrouprglmerbrlmerbsummary_sigma2

Dependencies:backportsbayestestRbootbroomclicodacolorspacecowplotcpp11datawizardDerivdoBydplyrfarverforecastfracdiffgenericsggplot2glmbayesglmbayesCoreglmmTMBgluegtableinsightisobandjsonlitelabelinglatticelifecyclelme4lmebayesCorelmtestmagrittrMASSMatrixmgcvminqamodelrnlmenloptrnmathopenclnnetnumDerivopencltoolspbkrtestpillarpkgconfigpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelRdpackreformulasrlangRTMBS7sandwichscalesstringistringrtibbletidyrtidyselecttimeDateTMBurcautf8vctrsviridisLitewithrzoo

Chapter 00: Introduction and roadmap
What this package covers | The five parts | Part 1 — Foundations | Part 2 — Specifying a model | Part 3 — Convergence and variance components | Part 4 — Generalized linear mixed models | Part 5 — Extensions and comparisons | Background reading in the wider ecosystem | A first look | Which chapter answers your question | Companion textbook | See also

Last update: 2026-08-11
Started: 2025-08-21

Chapter 01: Getting started
The data | The formula | Inspecting the design | Setting up priors | Fitting | Reading more | Standard accessors | Comparing with lme4 | What to read next | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 02: From lm and glm to mixed models
Chapter 02: From lm/glm to mixed models | Three ways to handle groups | The parameterization | The level-2 design | The two restrictions | One grouping factor | Uncorrelated random effects: || not | | Every fixed effect must have a home | Log-concave likelihoods | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 03: The prior workflow
Step 1: model_setup() | Step 2: Prior_Setup_GLMM() | The prior-weight idea | What gets centered where | The fields | The ING window | Step 3: pfamily_list() | Overriding a prior by hand | Putting it together | Checking prior sensitivity | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 04: Linear mixed models with lmerb()
The data and the question | A first model: random slopes only | Adding cross-level moderation | Priors | Fitting | Reading the result | The full summary | Per-school coefficients | What changed relative to Chapter 01 | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 05: Reading the output
Two blocks, two prefixes | print() | summary() | Pr(Prior_tail) | Accessors | ranef() | coef() | fixef() | The raw draws | Credible intervals | Dispersion and convergence metadata | Quick reference | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 06: Convergence and tv_tol
The contract | When sweeps are needed at all | What m_convergence responds to | The sweep history | Convergence plots | Verifying the certificate empirically | What convergence does not mean | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 07: Estimated variance components and the pilot stage
Fixed versus sampled | The truncation window | Fitting | What the variance components look like | The cost of honesty | The pilot stage | Reading the summary | When to sample the variance components | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 08: Observation dispersion
The default: one fixed variance | Per-group dispersion | Fitting | Reading the dispersion | Sampling a single scalar | Choosing | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 09: Poisson GLMMs
What changes for non-Gaussian responses | The model | Priors and fitting | Interpreting on the count scale | The full summary | Convergence | Cost | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 10: Binomial GLMMs
Setting up | Full rank is not the same as estimable | Fitting | Reading it on the probability scale | Per-state effects | Why the sweep count is higher | The full summary | Practical notes for binary data | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 11: Point estimates without simulation
Iterated conditional modes | It really is the posterior mean | What you get and what you do not | The non-Gaussian case | When to use it | See also

Last update: 2026-08-11
Started: 2020-07-05

Chapter 12: Row-block models
When you want this | A worked example | Comparing blocks | Versus the hierarchical fit | Generalized responses | What you give up | See also

Last update: 2026-08-11
Started: 2025-08-21

Chapter 13: Comparison with lme4 and glmmTMB
Same model, three packages | What is actually different | The feature matrix | Variance components | Choosing | Interface differences to remember | See also

Last update: 2026-08-11
Started: 2025-12-30

Readme and manuals

Help Manual

Help pageTopics
lmebayes: Bayesian Linear Mixed-Effects Models via Two-Block Gibbs Samplinglmebayes-package lmebayes
Amitriptyline overdose dataAMI
Coerce 'ranef.lmerb' objects to long 'data.frame' formatas.data.frame.ranef.lmerb
Bike Sharing Dataset (Processed)BikeSharing
Boston housing data with mean-centered predictorsBoston_centered
Canadian Automobile Insurance Claims for 1957-1958carinsca
Cleveland Heart Disease DatasetCleveland
Extract combined coefficients (fixed + random) by groupcoef.glmerb coef.lmerb
Build a named list of dGamma measurement-dispersion priorsdGamma_list
Directional Tail Diagnosticdirectional_tail
Extract fixed effects from 'lmerb' / 'glmerb' fitsfixef.glmerb fixef.lmerb
Fitting Bayesian Generalized Linear Modelsglmb
Fitting Blocked Bayesian Generalized Linear ModelsglmbBlock print.bglmb
Fit a Bayesian generalized linear mixed-effects model (GLMM) to data, via two-Block Gibbs samplingglmerb print.glmerb
OpenCL compile-time status for 'lmebayes'has_opencl
Fitting Bayesian Linear Modelslmb
Fitting Blocked Bayesian Linear ModelslmbBlock print.blmb
Fit a Bayesian linear mixed-effects model (LMM) to data, via two-Block Gibbs samplinglmerb print.lmerb
Model setup for generalized linear mixed modelsmodel_setup
Prior Family Objects for Bayesian ModelsdGamma dIndependent_Normal_Gamma dNormal dNormal_Gamma pfamily
Build a named list of pfamily objects from a prior-setup objectpfamily_list
Combined mean-convergence plot for Block~2 fixed effects (Claim 1)plot_mean_convergence
Combined variance-convergence plot for Block~2 fixed effects (Claim 3)plot_var_convergence
Print random effects in 'lme4' layoutprint.ranef.lmerb
Setup Prior ObjectsPrior_Setup
Prior setup for generalized linear mixed modelsPrior_Setup_GLMM
Prior setup for row-block regressionsPrior_SetupGroup
Extract random effects from Bayesian mixed model fitsranef.glmerb ranef.lmerb
The Bayesian Generalized Linear Mixed-Effects Model Distributionrglmerb
The Bayesian Linear Mixed-Effects Model Distributionrlmerb
Summarize per-group measurement dispersion (sigma^2)as.data.frame.summary.sigma2.lmerb print.summary.sigma2.lmerb summary_sigma2 summary_sigma2.glmerb summary_sigma2.lmerb
Summarize bglmb fitsprint.summary.bglmb summary.bglmb
Summarize blmb fitsprint.summary.blmb summary.blmb
Summarize Bayesian linear mixed model fitsprint.summary.lmerb summary.glmerb summary.lmerb
Summarize 'ranef.lmerb' objectssummary.ranef.lmerb