- The previous
is_model()
function has been renamed tois_model_supported()
since it was unclear if the function checked the entered object was a model or a supported model in insight. The newis_model()
function checks if the entered object is a model object, whileis_model_supported()
checks if a supported model object.
format_value()
andformat_table()
as utility-functions to format (model) output, especially for tabular output.color_if()
as utility-function to add color formatting to values, depending on certain conditions.
find_formula()
now extracts group factors of random effects for gamlss models.find_parameters()
andget_parameters()
no longer showNA
coefficients from group factors of random effects for gamlss models.get_data()
dropped value and variable label attributes, when model frame contained matrix variables (like splines).
get_variance()
now supports models with Gamma-family.get_weights()
andfind_weights()
now work for brms-models.
- Fix CRAN-check issues due to recent update from the panelr-package.
- Updates
CITATION
, based on publication in JOSS. - Added
nobs()
-method for those model-objects supported by insight that did not yet provide such a method.
betabin
andnegbin
(aod),BBreg
andBBmm
(HRQoL),wbm
(panelr),survfit
(survival)
clean_parameters()
, which returns a data frame with "decomposed" parameters, i.e. a data frame with information about the clean parameter name, whether it is a fixed or random effect, from conditional or zero-inflated component, and if it is a parameter related to specific grouping factors of random effects (#106).print_parameters()
, which can be called on top ofclean_parameters()
to get a list of data frames that represent the different model components (fixed, random, zero-inflated, ...) and which is in shape for printing summary statistics of complex models.find_interactions()
to return all low/high order interaction terms in a model.find_weights()
andget_weights()
to find / get model weights.
- To reduce interface complexity,
find_parameters()
andget_parameters()
for objects of classaovlist
now return the elements$conditional
and$random
, to be in line with other supported objects. - The argument
resp
inget_response()
was renamed toselect
, to have a more clear verb (#114). - The functions
find_variables()
andfind_terms()
were flipped, because what previously was considered as "term" was actually a "variable", and vice versa.
find_parameters()
andget_parameters()
now allow to return asigma
-element for multivariate-response models (brmsfit, stanmvreg).find_parameters()
andget_parameters()
now return the intercepts for polr models.find_parameters()
gets aneffects
and acomponent
-argument, similar to many other functions in insight.get_priors()
now returnsdistribution = "uniform"
when model was fitted with flat priors.model_info()
now returns an element$is_hurdle
for hurdle models.
find_parameters()
returned priors forbrmsfit
-objects as$random
-element. Now,find_parameters()
returns a$priors
-element (#98).find_parameters()
did not remove smooth-parameters that usedte()
orti()
.- Fixed various issues with non-linear brms-models.
find_formula()
(and hence,find_response()
orget_data()
) did not work for multi-column responses in null-models (#100).- Fixed bugs with models from package plm that occurred during the latest plm-update.
find_predictors()
did not split nested random effects when these were written asg1:g2
insteadg2/g2
in the random part of the model formula.- Fixed issues with
all_model_equal()
. get_data()
did not return(weights)
columns for some model objects.get_priors()
for stanreg-models returned the priors in sorted order, so sometimes parameter names and associated prior values did not match (#111).get_variance()
did not calculate random effect variances, when interaction terms in random slopes were also present in fixed effects, but the interaction was written in different order (e.g.,a*b
andb*a
) (#112).- Fixed issue with tibbles in
get_data()
. - Fixed issue with
get_priors()
for stanreg-models, whenprior_summary()
returnedNULL
for a prior (#116). - Fixed issue with the recent update of GLMMadaptive, which broke some of the functions.
biglm
andbigglm
(biglm),feis
(feisr),gbm
(gbm),BFBayesFactor
(BayesFactor),psm
(rms),LORgee
(multgee),censReg
(censReg),ols
(rms),speedlm
andspeedglm
(speedglm),svyolr
(survey)
is_nullmodel()
to check if model is a null-model (intercept-only), i.e. if the conditional part of the model has no predictors.has_intercept()
to check if model has an intercept.
- Functions like
find_predictors()
orfind_terms()
returnNULL
for null-models (intercept-only models). Useis_nullmodel()
to check if your model only has an intercept-parameter (but no predictors). get_variance()
no longer stops if random effects variance cannot be calculated. Rather, the return-value for$var.random
will beNULL
.
get_variance()
now computes the full variance for mixed models with zero-inflation component.get_priors()
now returns the default-prior that was defined for all parameters of a class, if certain parameters have no specific prior.find_parameters()
gets aflatten
-argument, to either return results as list or as simple vector.find_variables()
gets aflatten
-argument, to either return results as list or as simple vector.
get_data()
did not work when model formula contained a function with namespace-prefix (likelm(Sepal.Length ~ splines::bs(Petal.Width, df=4)
) (#93).get_priors()
failed for stanreg-models, when one or more priors had no adjusted scales (#74).find_random()
failed for mixed models with multiple responses.get_random()
failed for brmsfit and stanreg models.get_parameters()
andfind_parameters()
did not work forMixMod
-objects without zero-inflation component, whencomponent = "all"
(the default).find_formula()
did not work forplm
-models without instrumental variables.find_formula()
returned random effects as conditional part of the formula for null-models (only intercept in fixed parts) (#87).- Fixed issue with invalid notation of instrumental-variables formula in
felm
-models for R-devel on Linux. - Fixed issue with
get_data()
for gee models, where incomplete cases were not removed from the data. - Fixed potential issue with
get_data()
for null-models (only intercept in fixed parts) from models of classglmmTMB
,brmsfit
,MixMod
andrstanarm
(#91). find_variables()
no longer returns (multiple)"1"
for random effects.
- Better handling of
AsIs
-variables with division-operation as dependent variables, e.g. if outcome was defined asI(income/frequency)
, especially forfind_response()
andget_data()
. - Revised package-functions related to
felm
-models due to breaking changes in the lfe-package.
iv_robust
(estimatr),crch
(crch),gamlss
(gamlss),lmrob
andglmrob
(robustbase, #64),rq
,rqss
andcrq
(quantreg),rlmer
(robustlmm),mixed
(afex),tobit
(AER) andsurvreg
(survival).
get_variance()
, to calculate the variance components from mixed models of classmerMod
,glmmTMB
,MixMod
,rlmer
,mixed
,lme
andstanreg
(#52). Furthermore, convenient shortcuts to return the related components directly, likeget_variance_random()
orget_variance_residual()
.find_algorithm()
, to get information about sampling algorithms and optimizers, and for Bayesian models also about chains and iterations (#38).find_random_slopes()
, which returns the names of the random slopes of mixed models.get_priors()
, to get a summary of priors used for a model (#39).is_model()
to check whether an object is a (supported) regression model (#69).all_models_equal()
to check whether objects are all (supported) regression models and of same class.print_color()
(resp.print_colour()
) to print coloured output to the console. Mainly implemented to reduce package dependencies.
find_parameters()
andget_parameters()
get aparameters
-argument forbrmsfit
andstanreg
models, to allow selection of specific parameters that should be returned (#55).find_parameters()
andget_parameters()
now also return simplex parameters of monotic effects (brms only) and smooth terms (e.g. for gam-models).find_terms()
andfind_predictors()
no longer return constants, in particularpi
(#26).- For
gls
andlme
objects, functions likefind_formula()
etc. also return the correlation component (#19). model_info
now returns$is_tweedie
for models from tweedie-families.
find_parameters()
andget_parameters()
did not preserve coefficients of monotonic category-specific effects from brmsfit-objects.- Fixed bug that sometimes returned more elements for
find_predictors()
orget_parameters()
than requested. - Fixed bug in
get_data()
for MixMod-objects when response variable was defined viacbind()
. - Fixed bug in
get_response()
for models that usedcbind()
with a substraction (e.g.cbind(success, total - success)
). In such cases, values for second column (in this example:total
) were the substracted valuestotal - success
, not the original values fromtotal
.
- Initial release.