Estimation of Model-Based Predictions, Contrasts and Means
Overview
Implements a general interface for model-based estimations for a wide variety of models, used in the computation of marginal means, contrast analysis and predictions. For a list of supported models, see 'insight::supported_models()'.
Breaking Changes
- The
comparisonargument inestimate_contrasts()forbackend = "emmeans"now defaults to"revpairwise", to return consistent results regarding the sign of contrasts with the"marginaleffects"backend.
Changes
- For contrasts of models where predictions vary by response category (e.g., categorical, ordinal/cumulative or multinomial models, as well as multivariate response models),
estimate_contrasts()now returns separateResponse1andResponse2columns instead of merging the response category label into theLevel1andLevel2columns (#646). - The
iterationsargument can now also be used for Bayesian model inestimate_means(),estimate_slopes(), andestimate_contrasts(), which is then passed to thendrawsargument and controls how many samples are drawn from the posterior when calculating marginal means, effects or contrasts.
Show all changes in 0.17.0Hide the rest of the changes in 0.17.0
ci = NULLnow suppresses calculation of standard errors and confidence intervals.- The
dataargument can be used as an alias fornewdatainestimate_means(),estimate_slopes(), andestimate_contrasts(), and is passed to the related *marginaleffects* functions. - Improved default settings for plots using
tinyplot(): facets now automatically remove redundant axes. If you prefer to keep them, you can simply enable them by settingframe = TRUE.- The x-axis now automatically adjusts its limits when categorical predictors are used. By setting
xlimtoc(0.5, n + 0.5), the geoms are moved closer together, resulting in a more compact appearance. tinyplot() for *modelbased* objects now supports standard arguments following easystats conventions, allowing for more fine-grained plot customizations (e.g., text/line sizes, color palettes, and axis title sizes).- New options for printing (in particular, formatting CIs), see also documentation (
?modelbased::"modelbased-options"). - Improved documentation for
estimate_means()and vignettes about technical details of marginalization.
Bug fixes
estimate_contrasts()withbackend = "emmeans"now correctly parses factor levels that contain" - "in their names (e.g.,"A - High","B - Low"). emmeans wraps such levels in parentheses (e.g.,"(A - Low) - (A - High)"), which is now handled properly (#649).- Fixed issue with
estimate = "average"inestimate_slopes()when nobyvariable was specified and therefore no data grid created. This caused an issue with filtering the output.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-23
- ERROR12 OK, 1 ERROR2026-07-21
- OK14 OK2026-03-10
Documentation
Release 0.18.0 has not been analysed yet.
- Help pages
- 24 (3 internal)includes a package overview page
- Examples that run
- 94%15 run in a plain check (13 of them under a condition) · 1 never run
- Exported functions with examples
- 93%
- Documented parameters
- 99%
- Return-value docs
- 79%
- Help pages citing references
- 29%
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 3
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
15 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/easystats/modelbased on 2026-10-11.
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-08
pkgdown site last built 2026-10-08, before release 0.18.0 (2026-10-18)
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-10-05Pull request: opened by its own accountCommits: 3 by its own account · at least 3 crediting it in the message
- Gemini CLIfirst seen 2026-02-05Seen in the repository: GEMINI.mdNamed in .Rbuildignore: GEMINI.md
Dependencies
Installing modelbased adds 4 packages (0 with compiled code, 2.9 MB of source tarballs). Heaviest: insight 1.2 MB, parameters 701 KB, bayestestR 576 KB.
Show all 13 packagesHide all 13 packages
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.18.0Latest2026-10-18 · current release · diff ↗ ·
listed once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-18 16:17 UTC, so it stayed less than the time between readings. - 0.17.02026-08-28 · diff ↗
- 0.16.02026-06-30 · diff ↗
- 0.15.02026-05-10 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.14.0
- 0.13.12025-12-08 · diff ↗
- 0.13.0
- 0.12.0
- 0.11.22025-05-31 · diff ↗
- 0.11.0
- RR 4.5.0 released · 2025-04-11
- 0.10.02025-03-10 · diff ↗ ·
removed 1 export
visualisation_matrixadded 2 exports
pool_contrasts, pool_predictions - 0.9.02025-02-05 · diff ↗ ·
removed 5 exports
estimate_response, get_marginaleffects, model_emcontrasts, model_emmeans, model_emtrendsadded 4 exports
get_marginalcontrasts, get_marginalmeans, get_marginaltrends, print_html - 0.8.92024-10-26 · diff ↗
- 0.8.82024-06-11 · diff ↗
Show 24 earlier eventsHide 24 earlier events
- RR 4.4.0 released · 2024-04-24
- 0.8.72024-02-15 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.8.62023-01-13 · diff ↗
- 0.8.5
- unarchivedReturned to CRAN2022-05-30
- archivedRemoved from CRAN2022-05-30check problems were not corrected in time
- 0.8.12022-05-30 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.8.02022-03-31 · diff ↗ ·
removed 2 exports
data_matrix, model_marginaleffectsadded 4 exports
get_emcontrasts, get_emmeans, get_emtrends, get_marginaleffects - 0.7.2
- 0.7.1
- 0.7.02021-06-06 · diff ↗ ·
removed 2 exports
as.numeric_ifnumeric, data_restoretypeadded 6 exports
describe_nonlinear, estimate_expectation, estimate_grouplevel, model_emmeans, reshape_grouplevel, visualisation_recipe - RR 4.1.0 released · 2021-05-18
- 0.6.02021-04-12 · diff ↗ ·
removed 1 export
reshape_drawsadded 3 exports
data_restoretype, estimate_prediction, estimate_relation - 0.5.12021-01-27 · diff ↗
- 0.5.02021-01-15 · diff ↗
- 0.4.02020-12-06 · diff ↗
- 0.3.02020-09-27 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.1.22020-03-12 · diff ↗
- 0.1.12020-01-27 · diff ↗
- 0.1.02020-01-12
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2020-01-12
- Total releases
- 30 / 6 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.0
- Bundled data
- 17 KB / 4 files
- Download size
- 624 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("modelbased")This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.