Skip to content

brmsmargins

0.3.0Package record

Bayesian Marginal Effects for 'brms' Models

0packages dependsuggested by 1
39.2Kdownloads / year
91.8%test coverage
13/13flavors OK

Overview

About

Calculate Bayesian marginal effects, average marginal effects, and marginal coefficients (also called population averaged coefficients) for models fit using the 'brms' package including fixed effects, mixed effects, and location scale models. These are based on marginal predictions that integrate out random effects if necessary (see for example doi:10.1186/s12874-015-0046-6 and doi:10.1111/biom.12707).

Changes in 0.3.0
  • Now supports response variables with a binomial distribution. Predictions that marginalise over random effects will use the number of trials. For contrasts, such as using brmsmargins() you can use the at = argument to force trials to 1 to get marginal probabilities rather than counts of successful trials.
  • Experimental support for integrating out random effects from a student t distribution. Currently only supports this for location parameters. When dpar is not empty in brms only Gaussian distributions are supported. Some caution is needed here as brms uses the same degree of freedom parameter for all random effects of the same grouping variable, so for complex random effect structures, there may be errors in how they are integrated out.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 35.4 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-04
  • WARNING12 OK, 1 WARNING2026-07-03
  • OK13 OK2026-06-09
Show 5 earlier changesHide 5 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK12 OK2026-04-25
  • WARNING12 OK, 1 NOTE, 1 WARNING2026-04-22
  • ERROR11 OK, 1 NOTE, 1 WARNING, 1 ERROR2026-04-18
  • WARNING10 OK, 4 WARNING2026-03-10
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 620 wordsVignettesYes · 3 · staticNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsiteYes · pkgdown
Help pages
18 (8 internal)
Examples that run
88%7 run in a plain check · 1 never run
Exported functions with examples
80%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
22%

Downloads

39.2K
CRAN downloads in the past year
Rank #2,329 · ~107/day · ~3.3K/mo
Daily download trend is not available in this view yet.
2.5K30 days
7.2K90 days
39.2K1 year
Compare downloads with other packages →
Also on1.9K r2u30 autocran

Repository

21Stars
2Forks
1Open issues
0Open PRs
2Releases
109Commits
2Commit identities
109 commits · Last activity 2026-06-18 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
42
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2024-02-14 · 192026-09-03 · 21
PracticesBeta

6 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/jwiley/brmsmargins on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-06-18 · The repository has a site deploy workflow

pkgdown site last built 2026-06-18

Coverage (1)
Coverage reporting (Codecov)
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
15 external dependencies (excludes base and recommended)

Installing brmsmargins adds 78 packages (37 with compiled code, 84 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.0.0
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 0.1.1 (2021)
Author · added in 0.2.0
Releases (4)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.3.0Latest
    record
    2026-04-06 · current release · diff ↗ ·
    added 1 export
    integratemvt
  • 0.2.1
    record
    2025-09-26 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.0
    record
    2022-05-19 · diff ↗ ·
    added 2 exports
    lmcpp, marginalcoef
  • R
    R 4.2.0 released · 2022-04-22
  • 0.1.1
    record
    2021-12-16
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-12-16
Total releases
4 / 5 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.0.0
Download size
960 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("brmsmargins")
Wiley, J. F., & Hedeker, D. (2026). brmsmargins: Bayesian Marginal Effects for 'brms' Models (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.brmsmargins

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for brmsmargins version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy