Easy Access to Model Information for Various Model Objects
Overview
A tool to provide an easy, intuitive and consistent access to information contained in various R models, like model formulas, model terms, information about random effects, data that was used to fit the model or data from response variables. 'insight' mainly revolves around two types of functions: Functions that find (the names of) information, starting with 'find_', and functions that get the underlying data, starting with 'get_'. The package has a consistent syntax and works with many different model objects, where otherwise functions to access these information are missing.
New supported models
- Support for models of class
glmmTMBfitted with the newordinal()family (*glmmTMB* >= 1.1.15). As forordinal::clm(), the thresholds are returned as conditional parameters ahead of the slopes, with standard errors and statistics obtained via the delta method (the thresholds are estimated on an internal, softmax-parameterized scale), while the intercept, which is fixed to zero by *glmmTMB*, is dropped.get_predicted()returns per-category probabilities forpredict = "expectation"and the most likely category forpredict = "classification", andget_variance()uses the distribution-specific residual variance of the latent scale, as forordinal::clmm().
Changes
Show all changes in 1.6.0Hide the rest of the changes in 1.6.0
is_converged()now supportsCmdStanMCMCmodels from *cmdstanr*, with the same checks and thresholds as for other Stan models. The values come from the$diagnostic_summary()and$summary()methods of the model. Other *cmdstanr* models, for example from$variational()or$optimize(), returnFALSEwith a message.stanfitmodels fromrstan::read_stan_csv()store the maximum treedepth outsidecontrol. For these models,is_converged()counts treedepth hits against this stored maximum, not against the default of 10.get_parameters()for *lavaan* and *blavaan* models gets atypeargument (in...). Ifstandardize = TRUEandtypeis given, it is passed tolavaan::standardizedSolution()orblavaan::standardizedPosterior(), for exampletype = "std.lv"ortype = "std.nox". The default is still"std.all".get_variance()fornlme::lme()models now returnscor.slopes, the correlations between random slopes, as for *lme4* models. Before, it was missing. This works for nested and non-nested grouping factors with general covariance blocks (pdSymmand the defaultpdLogChol). Blocks of classpdDiagorpdIdentdo not estimate correlations, so they add no entry tocor.slopes.export_table(format = "html")passes arguments ofgt::gt()from...togt::gt(), for exampleidorrowname_col(#631).is_converged()now supports models fitted with Stan (stanfit,brmsfitandstanreg). Before, it did not work for these models. It checks divergent transitions, transitions at the maximum treedepth, E-BFMI, R-hat, and bulk and tail effective sample size, with the thresholds of the warnings that *rstan* gives after sampling. E-BFMI is computed as inrstan::check_hmc_diagnostics(). The values of the checks are returned in thediagnosticsattribute. If convergence cannot be assessed, for example for models fitted with variational inference or withbrms::brm_multiple(),FALSEis returned with a message (#619).is_converged()now supportscoxphmodels from *survival*. Before, it did not work for these models. It checks whether the model ran out of iterations and whether a coefficient is possibly infinite, as *survival* does when it fits the model. If a check fails, it returnsFALSE. The attributediagnosticsshows the result of each check and the coefficients that are possibly infinite. For penalized models, the checks do not apply. For models withties = "exact"ortt()terms, and in the other cases that the help page lists,is_converged()cannot recompute them. In these cases, it returnsFALSE. Objects of other classes that inherit fromcoxph, such assurvival::clogit()andsurvey::svycoxph(), are not supported (#1090).
Bug fixes
find_parameters()andclean_parameters()now work for multivariate *brms* models with addition terms in the response, such asresp_weights()ortrials(). Before,find_parameters()returned empty elements with wrong response names, andclean_parameters()gave an error (easystats/bayestestR#700).- If you use the hidden
variableargument withsummary = TRUE,get_parameters()for *brms* models no longer fails with the errorobject 'parms' not found. The summary then has the columnsParameterandEstimate. get_predicted()for zero-inflated *glmmTMB* models no longer fails for population-level predictions (include_random = FALSE, or a model without random effects) when the data object of the model call was changed or removed after the fit. Also,get_predicted()for zero-inflated *glmmTMB* and *pscl* models now accepts new data in thenewdataargument. Before, it gave the errorformal argument "newdata" matched by multiple actual arguments.null_model()now works when the model was fitted inside a function and its call uses a local object other than the data, for examplefamily = fam. Before, it returnedNULLfor mixed models and gave an error for other models (easystats/performance#145).find_random_slopes()no longer reports a grouping factor or a *brms* correlation id as a random slope because its name is part of a slope name. An example ispin(0 + Intercept | p | g). For *brms* models, the explicitInterceptis no longer a random slope. Before,get_variance()warned that random slopes were not present as fixed effects for these models.get_modelmatrix()with newdatafor *nlme* (lme,gls),clmmand *brms* models returns one row per data row. A row with a missing value or a factor level that the model data does not have holdsNAvalues. Before, it was dropped. For *brms* models, an ordered factor given as a character vector indatagets the polynomial contrasts of the model.get_predicted()with newdataforlmeandglsmodels returnsNAfor rows with a missing value or a factor level that the model data does not have in a fixed-effect predictor, with a warning. If no row can be predicted, it returnsNULLwith a warning. Before, such a row madeget_predicted()return the predictions for the model data. Ifdatahas no grouping column,lmemodels give population-level predictions, as for *lme4* models.get_predicted()forlmeandglsmodels uses theciargument, with or without newdata. As for other models, the defaultci = NULLreturns no intervals or standard errors. Before, the interval level did not followci. Forlmemodels, an explicitlevelargument is passed topredict().- The confidence intervals of
get_predicted()forlmemodels, with or without newdata, use one degree of freedom value for all rows, the smallest of the values per coefficient. Before, the values per coefficient were recycled against the predictions. get_predicted()with newdataforclmmmodels returnsNULLwith a warning. Before, it returned the fitted values of the model data, transformed with the inverse link. Ifdatahas the rows of the model data and all of its predictor columns with the same values, the fitted values are still returned.find_parameters()for *brms* models again returns the standard deviations of smooth terms (sds_*) in thesmooth_termselement. It also returns the simplex parameters of monotonic effects (simo_*) in thesimplexelement. For multivariate models, each response gets only its own parameters (easystats/parameters#1191)get_data()formerModListobjects (package *merTools*) gets averboseargument. Ifverbose = FALSE, it gives no warning that the data cannot be accessed.get_variance()fornlme::lme()models with a random-effect block that has no intercept, for examplerandom = ~ 0 + day | Dog / Side:- For nested grouping factors,
get_variance()returnedNULL. - Without nested grouping factors,
var.slopeleft out the first slope of the block, andcor.slope_interceptreturned the correlation of two slopes as a slope-intercept correlation.
var.slope of nlme::lme() models now leaves out the term named
(Intercept), not the first term of a block. So a block whose intercept is
not its first term no longer reports the intercept as a slope. Such a block,
for example from nlme::pdBlocked(), now also has its intercept variance in
var.intercept.
get_variance()for *lme4* models with uncorrelated random effects, for example(1 + Days || Subject), now includes the random-slope variance invar.random. Before,var.randomincluded only the random-intercept variance. For nested grouping factors, for example(1 + Days || grp / subgrp),var.randomwasNULL. This also changesperformance::r2_nakagawa()andperformance::icc()for these models (#304, easystats/performance#428).export_table(format = "html")for a list of data frames now shows the caption of each data frame as the label of its row group, and the footer of each data frame as a source note. Before, a listfooteror a mix of captioned and uncaptioned tables gave an error. Of the footers stored as attributes, only the first one was kept, and a listcaptionbecame one title. If any data frame in the list has aComponent,Effects,GrouporResponsecolumn, the old output stays, but a listfooterno longer gives an error (#631).export_table(format = "html")for a single data frame with a list footer (a multi-line, colored footer) gave an error. The parts of the footer are now joined into one source note, as in text output.export_table(format = "tt")for a list of data frames now shows the caption of each data frame as the label of its row group, and the footer of each data frame as a note. Before, the captions were shown as an extragroupcolumn, the first caption became the title, and only the footer of the first data frame, or onlyfooterif given, was kept. A listcaption, or a mix oftable_titleandtable_captionattributes, gave an error. An unnamedcolumn_namesvector names the shown columns. Before, it also needed a name for thegroupcolumn. The old behavior stays if a data frame has one column, no rows, row groups (indent_rows) or aComponent,Effects,GrouporResponsecolumn, if the data frames have different column names, or ifby,row_groupsorcolumn_groupsis given. For these lists, each element of a listfooterstill gives one note. Each footer changes as for a single data frame. The color is not shown as a note, new lines at the start and end are removed, and an empty footer gives no note.export_table(format = "tt")for a single data frame now shows a footer as one note. A character vector gives its first string, because the second string is the color, and a list gives its strings joined. Before, each string was a note, so the color of a colored footer was shown as a second note, and a list footer with colors (a multi-line, colored footer) gave an error.get_sigma(),get_variance()andget_variance_residual()now support *brms* models wheresigmahas an intercept-only formula, for examplebf(y ~ x, sigma ~ 1). Sigma is the mean of the posterior draws ofb_sigma_Intercept, back-transformed with the link function ofsigma. Before,get_sigma()returnedNULLandget_variance()returned a residual variance of 1. Ifsigmavaries, for example withsigma ~ (1 | g),get_variance()now returns no residual variance with a message, as it already did forsigma ~ x(#967).find_parameters(),get_parameters()andclean_parameters()now work for *blavaan* models with multiple groups and equality constraints, for examplegroup.equal = "loadings". Before,find_parameters()andget_parameters()failed with the error "replacement has length zero".get_parameters(standardize = TRUE)now gives the correct names for the posterior draws of all *blavaan* models. Before, the names were shifted, because the standardized draws also include the fixed parameters.get_parameters()now also works for *blavaan* models with user-defined parameters (:=) and returns their posterior draws. Before, it failed with the error "Arguments must be mcmc objects".get_data(source = "mf")now works for *lavaan* and *blavaan* models with multiple groups and returns the grouping variable as a column. Together, these fixes letparameters::model_parameters()work for multiple-group *blavaan* models (easystats/parameters#735).get_varcov()for *fixest* models now supportsvcov = "HC0". Before, it gave an error. The result is the same asfixest::vcov_hetero(ssc = fixest::ssc(K.adj = FALSE)), the heteroskedasticity-consistent matrix without the small-sample adjustment. For"HC","HC4","HC4m"and"HC5", the error now names the supported types (#1251).find_predictors()andfind_variables()no longer return the matrix of the *brms* autocorrelation termssar(),car()andfcor(), for exampleWiny ~ x + sar(W). This matrix is an object indata2, not a variable in the data. The grouping variable ofcar()is still returned.- If *performance* is not installed,
get_variance()now gives an error that asks you to install it. Before, it returnedNULLwithout a message (#928). n_obs(disaggregate = TRUE)now returns the total number of trials for *brms* models with atrials()term in the response, for exampley | trials(size) ~ x. Before, it ignoreddisaggregateand returned the number of data rows (#581).get_variance()andget_variance_distribution()returned a wrong distribution-specific variance for beta-binomial models with a probit or cloglog link. The cause was the back-transformation of the null-model mean, which always used the inverse logit. The mean now uses the inverse link of the model.get_residuals()for *gamlss* models now returns response residuals (observed minus expected values) fortype = "response". Before, it returned the normalized quantile residuals without a warning. Themean()function of the family gives the expected values. Thus, the result is also correct for families wheremuis not the mean, for example zero-inflated families. For families without amean()function, the residuals usemu, with a warning (#327).- For a list of data frames,
caption = ""(ortitle = "") now makesexport_table()remove the captions of all tables. This includes captions stored as attributes.subtitle = ""andfooter = ""do the same for subtitles and footers. In a list of captions or footers,""removes the caption or footer of that table. Before this fix,export_table()still printed the attributes (#930). - For univariate non-linear *brms* models (
nl = TRUE),find_parameters()now returns the coefficients of the non-linear parameters ofmuas conditional parameters, and their group-level terms as random parameters. Before, they were returned as auxiliary parameters.find_auxiliary()no longer returns the names of these non-linear parameters.clean_parameters()labels their coefficients likesummary()from *brms*, for exampleult_Intercept. Theeffects,componentandparametersarguments ofget_parameters()now select the coefficients of non-linear parameters.get_varcov(),n_parameters(component = "conditional")andfind_parameters(component = "location")now include these coefficients, where they included none before. This also applies to non-linear parameters that are nested withnlf()(#1076). get_parameters()for *brms* models now returnsNULLwhen no parameter matches the selection ofeffects,componentandparameters. Before, depending on the selection, it returned the posterior draws of all parameters, an empty data frame, or an error (#1076).get_modelmatrix()forclmmmodels now uses the contrasts stored in the model, soget_variance()works forclmmmodels fitted with, for example,contrasts = list(x = "contr.sum"). Forclmmmodels, adataargument is now used. Forclmmandbrmsfitmodels, factor variables indataget the levels of the model data, and the contrasts of the model are used. Thus, new data with only some of the levels gives the correct columns. Acontrasts.arglist is now accepted for both model classes.- If variables used i
The NEWS section is longer than shown here.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR8 OK, 4 NOTE, 1 ERROR2026-07-29
- NOTE10 OK, 3 NOTE2026-07-16
- OK13 OK2026-07-15
- ERROR11 OK, 2 ERROR2026-07-11
Show 18 earlier changesHide 18 earlier changes
- OK13 OK2026-07-10
- ERROR12 OK, 1 ERROR2026-07-09
- OK13 OK2026-07-08
- ERROR12 OK, 1 ERROR2026-07-07
- OK13 OK2026-06-22
- ERROR12 OK, 1 ERROR2026-06-18
- OK13 OK2026-05-17
- ERROR12 OK, 1 ERROR2026-05-15
- OK13 OK2026-04-30
- ERROR12 OK, 1 ERROR2026-04-28
- OK12 OK2026-04-25
- NOTE13 OK, 1 NOTE2026-04-19
- ERROR11 OK, 1 NOTE, 2 ERROR2026-04-09
- NOTE13 OK, 1 NOTE2026-04-07
- ERROR12 OK, 1 NOTE, 1 ERROR2026-04-04
- NOTE13 OK, 1 NOTE2026-03-30
- ERROR13 OK, 1 ERROR2026-03-25
- NOTE13 OK, 1 NOTE2026-03-10
Documentation
- Help pages
- 115 (1 internal)includes a package overview page
- Examples that run
- 93%100 run in a plain check (44 of them under a condition) · 8 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 97%
- Documented parameters
- 95%
- Return-value docs
- 95%
- Help pages citing references
- 6%
Downloads
Repository
- PRs merged (all time)
- 94%
- Median days to close, 50 most recently updated closed issues
- 46
- 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 7 families in the upstream repository
Checks run against github.com/easystats/insight on 2026-10-18.
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-10-18
pkgdown site last built 2026-10-18
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-09-30Pull request: opened by its own accountCommits: 4 by its own account · at least 6 crediting it in the message
- Gemini CLIfirst seen 2026-02-04Seen in the repository: GEMINI.mdNamed in .Rbuildignore: GEMINI.mdCommits: at least 1 crediting it in the message
- Claude Codefirst seen 2026-09-07Pull request it wrote: opened by a project memberCommits: at least 3 crediting it in the message
- Gemini Code AssistCommits: at least 1 accepting its review suggestions
- Claude Opus 51 commit · Sep 2026
Dependencies
Installing insight adds no packages beyond those that come with R.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.6.0Latest
- 1.5.42026-09-05 · diff ↗
- 1.5.32026-08-25 · diff ↗
- 1.5.22026-06-28 · diff ↗
- 1.5.1
- RR 4.6.0 released · 2026-04-24
- 1.5.0
- 1.4.62026-02-04 · diff ↗
- 1.4.52026-01-26 · diff ↗
- 1.4.42025-12-06 · diff ↗
- 1.4.32025-11-24 · diff ↗
- 1.4.22025-09-02 · diff ↗
- 1.4.12025-08-29 · diff ↗
- 1.4.0
- 1.3.1
- 1.3.0
Show 75 earlier eventsHide 75 earlier events
- 1.2.0
- RR 4.5.0 released · 2025-04-11
- 1.1.0
- 1.0.22025-02-06 · diff ↗
- 1.0.12025-01-10 · diff ↗
- 1.0.02024-11-26 · diff ↗ ·
added 3 exports
get_dispersion, get_loglikelihood_adjustment, validate_argument - 0.20.52024-10-02 · diff ↗
- 0.20.42024-09-02 · diff ↗
- 0.20.32024-08-16 · diff ↗
- 0.20.22024-07-13 · diff ↗
- 0.20.12024-06-11 · diff ↗
- 0.20.02024-06-04 · diff ↗
- 0.19.112024-05-12 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 0.19.102024-03-22 · diff ↗
- 0.19.92024-03-15 · diff ↗
- 0.19.8
- 0.19.72023-11-26 · diff ↗
- 0.19.62023-10-12 · diff ↗
- 0.19.52023-09-13 · diff ↗
- 0.19.42023-09-10 · diff ↗
- 0.19.32023-06-29 · diff ↗
- 0.19.22023-05-23 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.19.12023-03-18 · diff ↗
- 0.19.0
- 0.18.82022-11-24 · diff ↗
- 0.18.7
- 0.18.62022-10-23 · diff ↗
- 0.18.5
- 0.18.42022-09-21 · diff ↗
- 0.18.3
- 0.18.2
- 0.18.0
- 0.17.12022-05-13 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.17.02022-03-29 · diff ↗ ·
added 8 exports
compact_character, compact_list, is_empty_object, n_unique, object_has_names, object_has_rownames, safe_deparse, trim_ws - 0.16.02022-02-17 · diff ↗ ·
removed 6 exports
data_match, data_relocate, data_restoretype, data_to_long, data_to_wide, to_numericadded 3 exports
format_capitalize, get_datagrid, text_remove_backticks - 0.15.02022-01-07 · diff ↗ ·
removed 3 exports
reshape_ci, reshape_longer, reshape_wideradded 1 export
standardize_column_order - 0.14.5
- 0.14.42021-09-02 · diff ↗
- 0.14.3
- 0.14.22021-06-22 · diff ↗
- 0.14.12021-05-28 · diff ↗ ·
added 8 exports
data_match, data_relocate, data_restoretype, data_to_long, data_to_wide, reshape_longer, reshape_wider, to_numeric - RR 4.1.0 released · 2021-05-18
- 0.14.02021-05-07 · diff ↗ ·
added 5 exports
check_if_installed, format_message, format_string, formula_ok, get_modelmatrix - 0.13.22021-04-01 · diff ↗ ·
added 7 exports
color_text, color_theme, colour_text, get_family, get_predicted_ci, is_gam_model, reshape_ci - 0.13.12021-02-22 · diff ↗
- 0.13.02021-02-15 · diff ↗
- 0.12.02021-01-14 · diff ↗ ·
added 16 exports
ellipsis_info, get_auxiliary, get_call, get_deviance, get_df, get_intercept, get_loglikelihood, get_predicted, get_residuals, is_mixed_model, is_nested_models, is_regression_model, loglikelihood, model_name, n_parameters, print_html - 0.11.1
- 0.11.0
- 0.10.0
- 0.9.62020-09-20 · diff ↗
- 0.9.52020-09-07 · diff ↗
- 0.9.12020-08-26 · diff ↗
- 0.9.0
- 0.8.52020-06-08 · diff ↗
- 0.8.42020-05-13 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.8.3
- 0.8.22020-03-06 · diff ↗
- 0.8.12020-02-02 · diff ↗
- 0.8.0
- 0.7.12019-11-28 · diff ↗
- 0.7.02019-11-14 · diff ↗
- 0.6.0
- 0.5.02019-09-07 · diff ↗ ·
added 6 exports
color_if, colour_if, find_statistic, format_table, format_value, is_model_supported - 0.4.12019-07-24 · diff ↗
- 0.4.02019-07-01 · diff ↗ ·
added 6 exports
all_models_same_class, clean_parameters, find_interactions, find_weights, get_weights, print_parameters - 0.3.0
- RR 3.6.0 released · 2019-04-26
- 0.2.02019-03-29 · diff ↗ ·
added 17 exports
all_models_equal, download_model, find_algorithm, find_random_slopes, get_correlation_slope_intercept, get_priors, get_variance, get_variance_dispersion, get_variance_distribution, get_variance_fixed, get_variance_intercept, get_variance_random, get_variance_residual, get_variance_slope, is_model, print_color, print_colour - 0.1.22019-03-05
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-03-05
- Total releases
- 82 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.6
- Bundled data
- 15 KB / 2 files
- Download size
- 1.2 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("insight")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.21105/joss.01412.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.