Assessment of Regression Models Performance
Overview
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
check_model()gets ashow_smoothargument. Withshow_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()andcheck_predictions()now work for multivariate models from package *brms*. Use theresponseargument to name the response to check. Withoutresponse, 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, ornbinom2family, 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 withverbose = TRUEa 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 asqf(0.5, p, n - p), as the documentation states. Herepis the number of fixed effects of the conditional model, andnis the number of observations in the fit. Before,pwas the number of numeric variables in the data. Ifn - pis less than 1,method = "cook"gives an error.check_outliers()gets agroupargument 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. WithGthe number of levels, levels above4 / Gare 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 bylavaan::fitMeasures(), and pooling arguments such aspool.methodcan be passed through...(#888).check_overdispersion()now warns for models with aquasipoissonorquasibinomialfamily. 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 fromMASS::polr(),survey::svyolr(),ordinal::clm2(),ordinal::clmm2(), andrstanarm::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. ForMASS::polr(),survey::svyolr(), andrstanarm::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()andMASS::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, asMBESS::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()) forglmand *fixest* models, but not forsvyglm()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 ofquasipoissonandquasibinomialglmmodels with aliased coefficients matchessummary(model)$dispersionup to the fitting tolerance. It already did so for otherstats::glm()models. Other classes that inherit fromglmnow also use their owndf.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 forquasipoissonglmmodels. Before, it showed the variance of a Poisson model. - Fixed issue in
check_predictions()for *brms* models withdec()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 fromlavaan::lavTestLRT(), and compares the models in order of their degrees of freedom.test_vuong()andtest_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, asMBESS::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()) forglmand *fixest* models, but not forsvyglm()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 ofquasipoissonandquasibinomialglmmodels with aliased coefficients matchessummary(model)$dispersionup to the fitting tolerance. It already did so for otherstats::glm()models. Other classes that inherit fromglmnow also use their owndf.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 forquasipoissonglmmodels. Before, it showed the variance of a Poisson model. - Fixed issue in
check_predictions()for *brms* models withdec()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 fromlavaan::lavTestLRT(), and compares the models in order of their degrees of freedom.test_vuong()andtest_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(), andbracl()for adjacent-category models). It also gives correct VIFs forVGAM::vglm()models with the multinomial or cumulative family. Before,brmultinom()models and parallelbracl()models got VIFs for the wrong coefficients. Otherbracl()models got no result, andvglm()models gave an error. Some models keep all coefficients for exactly collinear predictors, for examplennet::multinom(). For a singular correlation matrix of the coefficients,check_collinearity()now gives a warning and returnsNULL. 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, asubset, 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 ofshow_cithat 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 asy ~ a * bgave noa:brow, 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 aglm(#738). It now computes stacking weights for the models that have LOOIC and givesNAfor 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 the0 + Interceptformula syntax. Before, each VIF was shown under the name of the previous term and the last term was missing (#417).r2_nakagawa()andicc()now include the random-slope variance for *lme4* models with uncorrelated random slopes, such as(x || group). The fix is ininsight::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...tolavaan::fitMeasures()by name. Before, any extra argument other thanestimatorcaused an error, even an argument thatfitMeasures()accepts, such asfm_args(fm.argsin *lavaan* before 0.7).model_performance()for *lavaan* models no longer errors whenlavaan::fitMeasures()does not return an index, for example the loglikelihood, AIC, and BIC of models with ordinal indicators. These indices are nowNA.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 (acbind()response, or proportions withweights) 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 somebrmsfitmodels, #936).- Preserve method–threshold alignment in
print()method forcheck_outliers()for multi-method input. r2_tjur(),r2_somers(),r2_efron()andr2_mckelvey()now warn and returnNULLfor binomial models that are not Bernoulli models, liker2(). Examples are a proportion response with weights and acbind()response. Before, these functions returned inaccurate values or failed with an unclear error (#165).- The influential observations plot of
check_model()andcheck_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()andcheck_outliers()now use the threshold ofcheck_outliers(), including a user-suppliedthreshold. 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
- 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
Documentation
- 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
Repository
- 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
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
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.
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-01
pkgdown site last built 2026-10-01, before release 0.19.0 (2026-10-18)
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Gemini CLIfirst seen on or before 2025-06-18Seen in the repository: GEMINI.mdNamed in .Rbuildignore: GEMINI.mdCommits: at least 3 crediting it in the message
- GitHub Copilotfirst seen 2025-10-07Pull request: opened by its own accountCommits: 7 by its own account · at least 7 crediting it in the message
- Claude Codefirst seen 2026-05-03Named in .Rbuildignore: .claude
- Gemini Code AssistCommits: at least 3 accepting its review suggestions
Dependencies
Installing performance adds 3 packages (0 with compiled code, 2.2 MB of source tarballs). Heaviest: insight 1.2 MB, bayestestR 576 KB, datawizard 432 KB.
Show the 48 most downloaded packagesHide the 48 most downloaded packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.19.0Latest
- 0.18.22026-09-10 · diff ↗
- 0.18.12026-08-28 · diff ↗
- 0.18.02026-08-28 · diff ↗ ·
added 5 exports
interval_odds_ratio, median_odds_ratio, performance_ior, performance_mor, performance_poor - 0.17.1
- 0.17.02026-05-21 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.16.02026-02-04 · diff ↗
- 0.15.32025-12-01 · diff ↗
- 0.15.22025-10-06 · diff ↗
- 0.15.12025-08-30 · diff ↗
- 0.15.0
- 0.14.02025-05-22 · diff ↗ ·
added 3 exports
check_group_variation, performance_dvour, performance_reliability - RR 4.5.0 released · 2025-04-11
- 0.13.0
- 0.12.42024-10-18 · diff ↗
Show 44 earlier eventsHide 44 earlier events
- 0.12.3
- 0.12.22024-07-18 · diff ↗
- 0.12.1
- 0.12.02024-06-09 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.11.0
- 0.10.92024-02-17 · diff ↗
- 0.10.82023-10-30 · diff ↗
- 0.10.72023-10-28 · diff ↗
- 0.10.52023-09-12 · diff ↗
- 0.10.42023-06-02 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.10.3
- 0.10.22023-01-12 · diff ↗
- 0.10.12022-11-25 · diff ↗
- 0.10.02022-10-03 · diff ↗ ·
removed 1 export
performance_lrtadded 5 exports
check_clusterstructure, check_factorstructure, check_kmo, check_sphericity_bartlett, check_symmetry - 0.9.22022-08-10 · diff ↗
- 0.9.1
- RR 4.2.0 released · 2022-04-22
- 0.9.0
- 0.8.02021-10-01 · diff ↗ ·
removed 1 export
pp_checkadded 4 exports
check_heterogeneity_bias, check_multimodal, check_predictions, r2_loo_posterior - 0.7.32021-07-21 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.7.2
- 0.7.12021-04-09 · diff ↗ ·
added 3 exports
check_heteroskedasticity, check_posterior_predictions, test_lrt - 0.7.02021-02-03 · diff ↗ ·
added 6 exports
print_html, test_bf, test_likelihoodratio, test_performance, test_vuong, test_wald - 0.6.12020-12-09 · diff ↗
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.8
- 0.4.7
- 0.4.62020-05-03 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.4.52020-03-28 · diff ↗
- 0.4.4
- 0.4.3
- 0.4.22019-12-11 · diff ↗
- 0.4.0
- 0.3.0
- 0.2.02019-06-04 · diff ↗ ·
removed 4 exports
error_rate, hosmer_lemeshow, r2_coxnell, rseadded 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 - RR 3.6.0 released · 2019-04-26
- 0.1.02019-04-24
- RR 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.
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.