Skip to content

performance

0.19.0Package record

Assessment of Regression Models Performance

27packages dependsuggested by 25
1.3Mdownloads / year
–test coverage
13/13flavors OK

Overview

About

Utilities for computing measures to assess model quality, which are not directly provided by R's 'base' or 'stats' packages. These include e.g. measures like r-squared, intraclass correlation coefficient (Nakagawa, Johnson & Schielzeth (2017) doi:10.1098/rsif.2017.0213), root mean squared error or functions to check models for overdispersion, singularity or zero-inflation and more. Functions apply to a large variety of regression models, including generalized linear models, mixed effects models and Bayesian models. References: Lüdecke et al. (2021) doi:10.21105/joss.03139.

Changes in 0.19.0

Changes

  • check_model() gets a show_smooth argument. With show_smooth = FALSE, the Linearity and Homogeneity of Variance panels draw neither the LOESS smoother nor the cell means, and the Influential Observations panel draws no LOESS smoother. This needs *see* newer than 0.14.2. Older versions ignore the setting.
  • check_model() and check_predictions() now work for multivariate models from package *brms*. Use the response argument to name the response to check. Without response, both functions give an error that lists the names of the responses (#908).
  • check_model() now shows the plot of influential observations for models from package *glmmTMB* with a gaussian, poisson, binomial, Gamma, or nbinom2 family, and without zero-inflation or a dispersion formula. The plot uses hat values and a one-step approximation of Cook's distance, so the model is not refit. For other *glmmTMB* models, the plot is skipped, and with verbose = TRUE a message names the reason. For the same models, plot(check_outliers()) shows this plot with the Cook's distances from the refits (#95).
Show all changes in 0.19.0Hide the rest of the changes in 0.19.0
  • check_outliers() now computes the default threshold for Cook's distance as qf(0.5, p, n - p), as the documentation states. Here p is the number of fixed effects of the conditional model, and n is the number of observations in the fit. Before, p was the number of numeric variables in the data. If n - p is less than 1, method = "cook" gives an error.
  • check_outliers() gets a group argument for models from packages *glmmTMB* and *lme4*. It gives Cook's distance for each level of a grouping variable. The model is refit without each level in turn. With G the number of levels, levels above 4 / G are flagged (#95).
  • check_outliers() now supports models from package *glmmTMB*. Cook's distance is computed by refitting the model without each observation, and all data-based methods (like "zscore_robust" or "mahalanobis") work as well (#95).
  • model_performance() now supports models fitted to multiple imputed data sets with package *lavaan.mi*. The fit indices are pooled across imputations by lavaan::fitMeasures(), and pooling arguments such as pool.method can be passed through ... (#888).
  • check_overdispersion() now warns for models with a quasipoisson or quasibinomial family. These models already estimate a dispersion parameter, so their standard errors account for overdispersion. When over- or underdispersion is detected, the printed conclusion also says so (#734).

Bug fixes

  • check_collinearity() now gives the correct adjusted VIF (SE_factor) for factor terms in models with a factor response, such as logistic and ordinal models, and in mixed models with grouping factors. Before, these models got the square root of the VIF for every term, also for factors with more than two levels.
  • check_collinearity() now gives the correct VIFs for ordinal models from MASS::polr(), survey::svyolr(), ordinal::clm2(), ordinal::clmm2(), and rstanarm::stan_polr(). These models have one threshold for each outcome level except one, and no single intercept. Before, check_collinearity() dropped only the first column of the variance-covariance matrix as the intercept. The VIFs then included the thresholds. For MASS::polr(), survey::svyolr(), and rstanarm::stan_polr(), they also left out the first slope. Thus the VIFs were wrong.
  • Some models drop an aliased predictor, which is a linear combination of other predictors. For such ordinal::clm() and MASS::polr() models, check_collinearity() now warns that the model matrix is rank deficient. It also labels each VIF with its own term.
  • check_collinearity() uses a new method for the confidence intervals of VIF and tolerance. The method inverts the noncentral F distribution of the auxiliary regression of each term, as MBESS::ci.R2() does for fixed predictors (Kelley 2007). The old interval had an infinite upper limit for VIFs close to 1, and no upper limit for a VIF of exactly 1 (#597).
  • check_overdispersion() now uses the residual degrees of freedom of the model (df.residual()) for glm and *fixest* models, but not for svyglm() models (package *survey*). Before, it subtracted the number of coefficients from the number of observations. That was wrong for models with aliased coefficients and for *fixest* models with fixed effects. Now, the dispersion ratio of quasipoisson and quasibinomial glm models with aliased coefficients matches summary(model)$dispersion up to the fitting tolerance. It already did so for other stats::glm() models. Other classes that inherit from glm now also use their own df.residual(). For example, gam() models (package *mgcv*) use the effective degrees of freedom.
  • check_overdispersion() now gives correct results for models from package *glmx* with a negative binomial family, or with a binomial family and more than one trial. *glmx* has no method for Pearson residuals, so its stored deviance contributions were used before. Bernoulli models and other *glmx* families give an error.
  • If a model has no Pearson residuals, check_overdispersion() now gives an error. Before, it used the formula for Poisson models, which is wrong for other families.
  • The overdispersion plot of check_model() now uses the estimated dispersion for quasipoisson glm models. Before, it showed the variance of a Poisson model.
  • Fixed issue in check_predictions() for *brms* models with dec() response (Wiener and RT-choice families); the RT part of the model is now checked.
  • test_performance() now works for models from package *lavaan*. Before, it failed with an infinite recursion. It returns the Bayes factor and the likelihood-ratio test from lavaan::lavTestLRT(), and compares the models in order of their degrees of freedom. test_vuong() and test_wald() now give a clear error for *lavaan* models instead of the same recursion (#427).
  • check_collinearity() uses a new method for the confidence intervals of VIF and tolerance. The method inverts the noncentral F distribution of the auxiliary regression of each term, as MBESS::ci.R2() does for fixed predictors (Kelley 2007). The old interval had an infinite upper limit for VIFs close to 1, and no upper limit for a VIF of exactly 1 (#597).
  • check_overdispersion() now uses the residual degrees of freedom of the model (df.residual()) for glm and *fixest* models, but not for svyglm() models (package *survey*). Before, it subtracted the number of coefficients from the number of observations. That was wrong for models with aliased coefficients and for *fixest* models with fixed effects. Now, the dispersion ratio of quasipoisson and quasibinomial glm models with aliased coefficients matches summary(model)$dispersion up to the fitting tolerance. It already did so for other stats::glm() models. Other classes that inherit from glm now also use their own df.residual(). For example, gam() models (package *mgcv*) use the effective degrees of freedom.
  • check_overdispersion() now gives correct results for models from package *glmx* with a negative binomial family, or with a binomial family and more than one trial. *glmx* has no method for Pearson residuals, so its stored deviance contributions were used before. Bernoulli models and other *glmx* families give an error.
  • If a model has no Pearson residuals, check_overdispersion() now gives an error. Before, it used the formula for Poisson models, which is wrong for other families.
  • The overdispersion plot of check_model() now uses the estimated dispersion for quasipoisson glm models. Before, it showed the variance of a Poisson model.
  • Fixed issue in check_predictions() for *brms* models with dec() response (Wiener and RT-choice families); the RT part of the model is now checked.
  • test_performance() now works for models from package *lavaan*. Before, it failed with an infinite recursion. It returns the Bayes factor and the likelihood-ratio test from lavaan::lavTestLRT(), and compares the models in order of their degrees of freedom. test_vuong() and test_wald() now give a clear error for *lavaan* models instead of the same recursion (#427).
  • check_collinearity() now gives correct VIFs for multinomial models from package *brglm2* (brmultinom(), and bracl() for adjacent-category models). It also gives correct VIFs for VGAM::vglm() models with the multinomial or cumulative family. Before, brmultinom() models and parallel bracl() models got VIFs for the wrong coefficients. Other bracl() models got no result, and vglm() models gave an error. Some models keep all coefficients for exactly collinear predictors, for example nnet::multinom(). For a singular correlation matrix of the coefficients, check_collinearity() now gives a warning and returns NULL. Before, it returned meaningless VIFs.
  • If you combine "cook" with a method that flags no observation, such as "zscore_robust", check_outliers() no longer fails. Cook's distance now also works for binomial models with only factor predictors. For *glmmTMB* models, the refits for Cook's distance now use the data given to the model. Thus, models with missing values, a subset, or weights and offsets outside the data get correct values. If a refit fails with the full model's estimates as start values, check_outliers() tries it again without them.
  • check_collinearity() now gives correct VIFs for multinomial models from packages *nnet* (multinom()) and *mclogit* (mblogit()). Before, only the first intercept was removed and coefficients were matched to terms by position, so the VIFs belonged to the wrong coefficients. Now each term gets one VIF, computed from its slopes across all outcome levels, so it does not depend on the reference level (#907).
  • check_model() now uses the value of show_ci that the user sets. Before, it ignored that value. It always hid the confidence bands for models with only categorical predictors and always showed them for other models (#642, #490).
  • check_collinearity() now returns interaction terms for *brms* models. Before, a model such as y ~ a * b gave no a:b row, and the VIFs of the other terms belonged to the wrong coefficients. Models with more than one intercept, such as ordinal models, also gave VIFs for the wrong coefficients.
  • compare_performance() no longer fails when only some of the models have LOOIC, for example a *brms* model and a glm (#738). It now computes stacking weights for the models that have LOOIC and gives NA for the others. A missing weight now prints as an empty cell, not as (>.999).
  • check_model() no longer fails for *brms* models that cannot be converted to a frequentist model. It now returns only the posterior predictive check and multicollinearity panels, and a message lists the panels that were skipped (#461).
  • check_collinearity() now labels terms correctly for *brms* models that use the 0 + Intercept formula syntax. Before, each VIF was shown under the name of the previous term and the last term was missing (#417).
  • r2_nakagawa() and icc() now include the random-slope variance for *lme4* models with uncorrelated random slopes, such as (x || group). The fix is in insight::get_variance(). For these models, a shift of a predictor changes the values, and the documentation of both functions now says so (#428).
  • model_performance() for *lavaan* models now passes further arguments in ... to lavaan::fitMeasures() by name. Before, any extra argument other than estimator caused an error, even an argument that fitMeasures() accepts, such as fm_args (fm.args in *lavaan* before 0.7).
  • model_performance() for *lavaan* models no longer errors when lavaan::fitMeasures() does not return an index, for example the loglikelihood, AIC, and BIC of models with ordinal indicators. These indices are now NA.
  • check_overdispersion() now computes the Pearson chi-squared statistic from the model's own Pearson residuals whenever it does not use simulated residuals. Results change, and are now correct, for binomial models with more than one trial per observation (a cbind() response, or proportions with weights) and for models with prior weights. Before, the statistic used unweighted Poisson-style residuals and could be far off.
  • check_model() now correctly returns the random-effects normality panel for mixed models that specify random slopes using split terms such as (1 | group) + (0 + slope | group) (including || expansions, #845).
  • check_singularity() for models from package *nlme* no longer errors for nested random effects with more than one grouping level and now applies the tolerance check to the absolute values of the variance-covariance diagonal.
  • check_collinearity() no longer drops interaction terms when fallback term assignment is used (for example, in some brmsfit models, #936).
  • Preserve method–threshold alignment in print() method for check_outliers() for multi-method input.
  • r2_tjur(), r2_somers(), r2_efron() and r2_mckelvey() now warn and return NULL for binomial models that are not Bernoulli models, like r2(). Examples are a proportion response with weights and a cbind() response. Before, these functions returned inaccurate values or failed with an unclear error (#165).
  • The influential observations plot of check_model() and check_outliers() for linear mixed models from package *lme4* now shows standardized residuals instead of raw residuals. Before this fix, points fell outside the Cook's distance lines but were not flagged as outliers (#857).
  • The Cook's distance lines in the influential observations plot of check_model() and check_outliers() now use the threshold of check_outliers(), including a user-supplied threshold. Before this fix, linear models always used a threshold from the model's F statistic, so the lines did not match the flagged outliers (#916).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 6.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-09-16
  • ERROR11 OK, 2 ERROR2026-09-10
  • OK13 OK2026-09-05
  • NOTE12 OK, 1 NOTE2026-09-02
  • ERROR6 OK, 5 NOTE, 2 ERROR2026-08-28
Show 12 earlier changesHide 12 earlier changes
  • NOTE11 OK, 2 NOTE2026-07-16
  • OK13 OK2026-06-20
  • ERROR12 OK, 1 ERROR2026-06-18
  • OK13 OK2026-05-27
  • ERROR12 OK, 1 ERROR2026-05-24
  • OK13 OK2026-05-22
  • ERROR12 OK, 1 ERROR2026-05-20
  • OK13 OK2026-05-12
  • ERROR12 OK, 1 ERROR2026-05-09
  • OK13 OK2026-05-05
  • ERROR12 OK, 1 ERROR2026-05-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.19.0
READMEYes · 1,062 wordsVignettes· In the repository, left out of the releaseNEWSYes · 100% structured · mentions 0.19.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Cites a JOSS paper
Help pages
82 (2 internal)includes a package overview page
Examples that run
90%70 run in a plain check (36 of them under a condition) · 7 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
Exported functions with examples
99%
Documented parameters
100%
Return-value docs
92%
Help pages citing references
61%

Downloads

1.3M
CRAN downloads in the past year
Rank #334 · ~3.7K/day · ~111.3K/mo
Daily download trend is not available in this view yet.
103.6K30 days
304.4K90 days
1.3M1 year
Compare downloads with other packages →
Also on15.8K r2u11 autocran20K conda_forge443 c2d4u

Repository

1,160Stars
107Forks
70Open issues
6Open PRs
35Releases
2,582Commits
26Commit identities
r2aicperformancemodelslooreasystatsmixed-models
License file reads as GPL-3.0 · 2,582 commits · Last activity 2026-10-18 · +0.5% stars, 30d · Discussions: 21 posts
Responsiveness
How these are sampled
PRs merged (all time)
92%
Median days to close, 50 most recently updated closed issues
718
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-10-16 · 1,1012026-10-17 · 1,160
PracticesBeta

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

Checks run against github.com/easystats/performance on 2026-10-11.

Continuous integration (1)
GitHub Actions
Governance and community (5)
Code of conductContributing guideFundingSupport guide

Funding links: GitHub Sponsors

The repository owner accepts GitHub Sponsors

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-01

pkgdown site last built 2026-10-01, before release 0.19.0 (2026-10-18)

Coverage (1)
Coverage reporting
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (4)
lintrLint workflowAirRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Gemini CLIfirst seen on or before 2025-06-18
    Seen in the repository: GEMINI.md
    Named in .Rbuildignore: GEMINI.md
    Commits: at least 3 crediting it in the message
  • GitHub Copilotfirst seen 2025-10-07
    Pull request: opened by its own account
    Commits: 7 by its own account · at least 7 crediting it in the message
  • Claude Codefirst seen 2026-05-03
    Named in .Rbuildignore: .claude
Review tools
  • Gemini Code Assist
    Commits: at least 3 accepting its review suggestions
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

People & History

People (13)
Author, Maintainer since 0.1.0 (2019)
Author, Contributor · added in 0.5.1
Author, Contributor
Author, Contributor · added in 0.4.5
Author, Contributor · added in 0.10.0
Author, Contributor · added in 0.2.0
Author, Contributor · added in 0.7.2
Contributor · added in 0.7.1
Contributor · added in 0.10.3
Contributor · added in 0.18.0
Contributor · added in 0.12.3
Reviewer · added in 0.7.3
Reviewer · added in 0.7.3
Releases (51)

Pick two releases to compare their code metrics.

  • 0.19.0Latest
    record
    2026-10-18 · current release · diff ↗
  • 0.18.2
    record
    2026-09-10 · diff ↗
  • 0.18.1
    record
    2026-08-28 · diff ↗
  • 0.18.0
    record
    2026-08-28 · diff ↗ ·
    added 5 exports
    interval_odds_ratio, median_odds_ratio, performance_ior, performance_mor, performance_poor
  • 0.17.1
    record
    2026-06-30 · diff ↗ ·
    added 1 export
    check_priors
  • 0.17.0
    record
    2026-05-21 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.16.0
    record
    2026-02-04 · diff ↗
  • 0.15.3
    record
    2025-12-01 · diff ↗
  • 0.15.2
    record
    2025-10-06 · diff ↗
  • 0.15.1
    record
    2025-08-30 · diff ↗
  • 0.15.0
    record
    2025-07-10 · diff ↗ ·
    added 3 exports
    item_alpha, item_omega, item_totalcor
  • 0.14.0
    record
    2025-05-22 · diff ↗ ·
    added 3 exports
    check_group_variation, performance_dvour, performance_reliability
  • R
    R 4.5.0 released · 2025-04-11
  • 0.13.0
    record
    2025-01-15 · diff ↗ ·
    removed 2 exports
    check_posterior_predictions, posterior_predictive_check
  • 0.12.4
    record
    2024-10-18 · diff ↗
Show 44 earlier eventsHide 44 earlier events
  • 0.12.3
    record
    2024-09-02 · diff ↗ ·
    added 3 exports
    as.dag, check_dag, r2_mlm
  • 0.12.2
    record
    2024-07-18 · diff ↗
  • 0.12.1
    record
    2024-07-15 · diff ↗ ·
    added 1 export
    r2_ferrari
  • 0.12.0
    record
    2024-06-09 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.11.0
    record
    2024-03-22 · diff ↗ ·
    added 2 exports
    check_residuals, simulate_residuals
  • 0.10.9
    record
    2024-02-17 · diff ↗
  • 0.10.8
    record
    2023-10-30 · diff ↗
  • 0.10.7
    record
    2023-10-28 · diff ↗
  • 0.10.5
    record
    2023-09-12 · diff ↗
  • 0.10.4
    record
    2023-06-02 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.10.3
    record
    2023-04-07 · diff ↗ ·
    added 1 export
    item_discrimination
  • 0.10.2
    record
    2023-01-12 · diff ↗
  • 0.10.1
    record
    2022-11-25 · diff ↗
  • 0.10.0
    record
    2022-10-03 · diff ↗ ·
    removed 1 export
    performance_lrt
    added 5 exports
    check_clusterstructure, check_factorstructure, check_kmo, check_sphericity_bartlett, check_symmetry
  • 0.9.2
    record
    2022-08-10 · diff ↗
  • 0.9.1
    record
    2022-06-20 · diff ↗ ·
    added 1 export
    performance_cv
  • R
    R 4.2.0 released · 2022-04-22
  • 0.9.0
    record
    2022-03-30 · diff ↗ ·
    added 1 export
    check_concurvity
  • 0.8.0
    record
    2021-10-01 · diff ↗ ·
    removed 1 export
    pp_check
    added 4 exports
    check_heterogeneity_bias, check_multimodal, check_predictions, r2_loo_posterior
  • 0.7.3
    record
    2021-07-21 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.7.2
    record
    2021-05-17 · diff ↗ ·
    added 3 exports
    check_sphericity, mae, performance_mae
  • 0.7.1
    record
    2021-04-09 · diff ↗ ·
    added 3 exports
    check_heteroskedasticity, check_posterior_predictions, test_lrt
  • 0.7.0
    record
    2021-02-03 · diff ↗ ·
    added 6 exports
    print_html, test_bf, test_likelihoodratio, test_performance, test_vuong, test_wald
  • 0.6.1
    record
    2020-12-09 · diff ↗
  • 0.6.0
    record
    2020-12-01 · diff ↗ ·
    added 3 exports
    display, print_md, r2_somers
  • 0.5.1
    record
    2020-10-29 · diff ↗ ·
    added 1 export
    r2_posterior
  • 0.5.0
    record
    2020-09-12 · diff ↗ ·
    added 2 exports
    posterior_predictive_check, pp_check
  • 0.4.8
    record
    2020-07-27 · diff ↗ ·
    added 1 export
    variance_decomposition
  • 0.4.7
    record
    2020-06-14 · diff ↗ ·
    added 1 export
    multicollinearity
  • 0.4.6
    record
    2020-05-03 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.4.5
    record
    2020-03-28 · diff ↗
  • 0.4.4
    record
    2020-02-10 · diff ↗ ·
    added 2 exports
    check_itemscale, r2_efron
  • 0.4.3
    record
    2020-01-22 · diff ↗ ·
    added 2 exports
    performance_aic, performance_lrt
  • 0.4.2
    record
    2019-12-11 · diff ↗
  • 0.4.0
    record
    2019-10-21 · diff ↗ ·
    removed 1 export
    principal_components
    added 1 export
    performance
  • 0.3.0
    record
    2019-08-05 · diff ↗ ·
    removed 1 export
    r2_kl
    added 2 exports
    check_homogeneity, r2_kullback
  • 0.2.0
    record
    2019-06-04 · diff ↗ ·
    removed 4 exports
    error_rate, hosmer_lemeshow, r2_coxnell, rse
    added 21 exports
    check_autocorrelation, check_collinearity, check_distribution, check_heteroscedasticity, check_model, check_normality, check_outliers, performance_accuracy, performance_aicc, performance_hosmer, performance_logloss, performance_mse, performance_pcp, performance_rmse, performance_roc, performance_rse, performance_score, r2_coxsnell, r2_mckelvey, r2_xu, r2_zeroinflated
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.0
    record
    2019-04-24
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2019-04-24
Total releases
51 / 7 yrs
License
GPL-3 OSI
Minimum R
≥ 4.0
Download size
1.9 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("performance")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.21105/joss.03139.

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 performance version 0.19.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

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.

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