Releases: easystats/insight
insight 1.3.0
Breaking Changes
- The default option
"all"
for theeffects
argument offind_parameters()
andget_parameters()
for models from package brms and rstanarm has a new
behaviour and only returns fixed effects and random effects variance components,
but no longer the group level estimates. Useeffects = "full"
to return
all parameters. This change is mainly to be more flexible and gain more
efficiency for models with many parameters and / or many posterior draws.
New functions
is_bayesian_model()
as a convenient shortcut to check whether a model is
Bayesian or not.
Changes
-
Revised wording for alerts from
get_variance()
. -
The
effects
argument offind_parameters()
andget_parameters()
for
models from package brms and rstanarm get two new options,"grouplevel"
and"random_variances"
, to return only random effects variance components, or
group level effects. This is more efficient especially for models with many
samples and many parameters. Additionally, avariable
argument can be passed
toget_parameters()
, which is in turn passed toas.data.frame()
, to
extract parameters more efficiently. -
The
by
argument inexport_table()
now also splits tables when format is
not"html"
.
Bug fixes
- Fixed issue in
find_formula()
for models of classbarts
(package dbarts),
when formula was abbreviated usingy ~ .
.
insight 1.2.0
Breaking Changes
-
The handling of
brms
models infind_parameters()
,find_formula()
or
clean_parameters()
(and other functions) should now systematically take
the many possible distributional parameters into account, identifying the
different types of them, and assigning them to own values in the
Component
columns. insight should now be flexible enough to also cope
with user-defined variables that have been modelled as distributional
parameters. -
To be consistent with the naming pattern from package
brms
, all elements
related to distributional parameters now returns exactly that "dpar" name.
This means that, for instance,find_formula()
no longer returns an element
named$zero_inflated
, but instead$zi
. This only applies to models from
brms
! All other packages are not affected by this breaking change.
Changes
-
find_random()
andfind_random_slopes()
now also extract random effects
names from auxiliary components. -
find_random()
andfind_random_slopes()
now include random effects from the
dispersion component for models from package glmmTMB. -
clean_parameters()
for brms-models now assigns auxiliary parameters to their
relatedComponent
and overwrites former assignments to"conditional"
. -
format_table()
now includes more effect sizes when formatting column names. -
get_datagrid()
now allows named vectors for argumentslength
andrange
,
to match values with target variables defined inby
. -
get_datagrid()
gets aprotect_integer
argument, to allow a spread of
values from minimum to maximum of lengthlength
, also for integer values. -
export_table()
gets an argumentcolumn_names
, to change the column names
of the exported table. -
model_info()
gains aresponse
argument for classes that can be multivariate
response models that return multiple lists of model information (currently,
Stan models from rstanarm and brms). If notNULL
, only the information
for one of the response variables is returned. -
Creating a range of values in a
get_datagrid()
usingby
was now simplified
and works like regular R syntax, e.g.by = "mpg = 20:50"
. -
get_predicted()
for models of classbrmsfit
now supports Wiener models
or similar so called "decision models", that simultaneously model, e.g.,
reaction times and (discrete) choices. -
get_predicted()
no longer throws warnings for models of classbrmsfit
when distributional are predicted. -
find_offset()
gets anas_term
argument, which returns the offset as term,
including possible transformations. -
Token-option
"quartiles2"
was removed and option"quartiles"
now produces
the three quartile values (lower hinge, median, upper hinge). The former
option of"quartiles"
that included minimum and maximum was identical to the
already existing"fivenum"
option. -
New function
find_auxiliary()
, which is a small helper to extract all
distributional parameters that were used in models from package brms. -
display()
,print_md()
andprint_html()
get methods for matrix- and
array objects. -
Cleaning / revising package documentation.
Bug fixes
-
null_model()
now correctly calculates the null-model based on the data that
was used to fit the model (model frame), which can lead to different results
when the original data contained missing values. -
Fixed issue for
get_predicted()
with multivariate response models.
insight 1.1.0
Breaking Changes
get_datagrid()
no longer creates fractional parts when creating a range of
values for numeric variables that are integers.
Changes
-
get_datagrid()
now includes a dummy column for model weights (valuesNA
),
to work with models that used weights. -
get_datagrid()
gets adigits
argument, to round numeric representative
values. -
Argument
ci_digits
defaults todigits
informat_table()
. -
format_table()
gets aselect
argument, which can be used to select columns
and column layout in a glue-like style. -
find_response()
now also works for tidymodels workflows. -
get_transformation()
andfind_transformation()
now also detect
log-transformation with logarithmic base.
Bug fixes
- Fixed issue in
find_formula()
,find_response()
andfind_predictors()
for
multinomialgam
models from package mgcv.
insight 1.0.2
Changes
-
get_datagrid()
gives a more informative error message when a variable
specified inby
was not found in the data. -
The
by
argument inget_datagrid()
gets a new token-option,"[sample <number>]"
,
to draw a random sample of values.
Bug fixes
-
Option
"terciles"
and"terciles2"
inget_datagrid()
were swapped, i.e.
"terciles"
was doing what was documented for"terciles2"
and vice versa.
This has been fixed. -
include_random
inget_datagrid()
now works for nested random effects, i.e.
for more than one group level factor in the random effects. -
Fixed issue in
get_varcov()
for models of classbrmsfit
that included
monotonic effects.
insight 1.0.1
General
-
Support for models of class
oohbchoice
(package DCchoice). -
format_table()
gets astars_only
argument, to format p-value columns to
contain only significance stars. -
get_predicted()
for brms-models with categorical family now includes the
data of the data grid in the returned predictions, for better orientation.
Bug fixes
-
Fixed issues due to latest mice updates.
-
Fixed typo in
get_parameters.glmmadmb()
, which was erroneously renamed into
get_parameters.glmmTMBadmb()
. -
Fixed issues in
find_predictors()
andhas_intercept()
for brms models
with0 + Intercept
formula notation. -
Fixed issues in
get_statistic()
for models of classfixest
from
negative-binomial families. -
Fixed issue with
as.numeric()
method forget_sigma()
. -
get_datagrid()
now only returns valid levels wheninclude_random = TRUE
and group-level factor in random effects is numeric.
insight 1.0.0
Breaking changes
-
All deprecated arguments have been removed.
-
The
table_width
argument inexport_table()
now defaults to"auto"
.
General
-
get_transformation()
can now deal with any power-transformation, and also
returns results for divisions (scaled response) and Box-Cox transformations. -
find_transformation()
andget_transformation()
now also detects use of
divisions, likex/3
or Box-Cox transformations (like(x^lambda - 1) / lambda
). -
find_transformation()
andget_transformation()
get ainclude_all
argument,
to check all model terms for transformations. -
get_dispersion()
is now an exported function. -
Updated
get_varcov()
(and related documentation) to support new covariance
matrix estimation methods from the sandwich package. -
New function
validate_argument()
as a replacement formatch.arg()
with
more informative error message. -
The function to calculate the corrections for likelihood-values when the
response-variable is transformed is now exported asget_likelihood_adjustment()
. -
export_table()
can now split tables into more than three tables when
table_width
is used (formerly, the maximum number of split tables was three). -
Changed (improved) formatting for parameter tables in
export_table()
, when
format = "html"
. Rows are indented, and group headers are emphasized in
italic. -
formula_ok()
now also checks for syntactically invalid variable names.
Furthermore, argumentchecks
now allows to specify for which possibly
problematic formula notation should be checked. -
format_value()
gains adecimal_point
argument, to change the decimal point
in output conversion. -
format_bf()
withstars = TRUE
uses the°
symbol for inferiority
(evidence against the comparison). -
Added support for
coxph.panel
models. -
Added support for models of class
asym
(package panelr). -
Overhaul of documentation for the package-functions.
Bug fix
-
clean_parameters()
now uses the correct labels for the random effects
variances ("SD/Cor"
has changed to"Var/Cov"
). -
When
get_data()
could not properly evaluate the subset of a data set, it
now returns an informative warning and no longer errors. -
Fixed inaccuracy in
get_sigma()
for models of class brmsfit. -
Fixed issues in
get_variance()
for models of class brmsfit when the
sigma-parameter was directly modeled. -
Fixed issue in
compact_character()
andcompact_list()
for date-variables. -
Fixed edge case in
find_transformation()
for simple log-transformation of
the response variable. -
Fixed issue for
model_info.averaging()
.
insight 0.20.5
General
-
get_datagrid()
can now be used to extract the "grid" information from
{emmeans}
and{marginaleffects}
outputs. -
Arguments
na.rm
andna_rm
are deprecated throughout the package's functions.
Instead, useremove_na
.
Bug fixes
-
Fixed rendering issue of the example in
?insight::display
. -
Fixed issues due to recent changes in the glmmTMB package.
insight 0.20.4
New supported models
- Support for models of classes
glm_weighit
,multinom_weightit
and
ordinal_weightit
(package WeightIt).
Changes
-
null_model()
andformula_ok()
now warn when indexed data frames, such as
df[, 5]
, are used as response variable in the formula, as this can lead to
unexpected results. -
Minor improvements to
link_function()
andlink_inverse()
.
Bug fixes
-
Fixed regression from latest fix related to
get_variance()
for brms models. -
Fixed issue in
link_function()
andlink_inverse()
for models of class
cglm with"identity"
link, which was not correctly recognized due to a
typo.
insight 0.20.3
Changes
-
get_df()
now supports more model classes. -
get_variance()
gives an informative error if no mixed model is provided.
Bug fixes
-
Fixed issue in
find_formula()
,find_predictors()
andfind_variables()
for models from package brms with custom formulas. -
Fixed issues in
find_response()
for brms models withmi()
function in
the response variable. -
Fixed issue in
get_variance()
that could lead to recursive calls for
brms models, resulting in "infinite" resampling of the model. -
Fixed issue in
check_if_installed()
that erroneously tried to guess the
minimum required package version based on the SUGGEST field of the insight
package, instead of the package that was calling the function. -
Fixed issue in
get_modelmatrix()
for models from package brms with
special functions in the formula (likemo()
). -
Fixed issue in
ellipses_info()
when this function was called fromdo.call()
. -
Fixed issue with formatting unicode-symbols, where a wrong unicode-character
was used for "Omega". Furthermore, Omega2 and Eta2 are now correctly converted.
insight 0.20.2
New supported models
-
Support for models of class
glmgee
(package glmtoolbox). -
Support for models of class
svy2lme
(package svylme).
General
-
Massive overhaul of
get_variance()
. The function should be now more
accurate for different distributional families, in particular for
mixed regression models with Beta family. -
Improved accuracy of singularity-checks in
get_variance()
. -
get_variance()
gets a few new arguments:-
null_model
, to provide a null-model to be used for the calculation of
random effect variances. IfNULL
, the null-model is computed internally.
This argument is optional, but may be useful to save time, or when the
null-model cannot be calculated internally. -
approximation
, indicating the approximation method for the
distribution-specific (observation level, or residual) variance. -
model_component
, for models that can have a zero-inflation component,
specify for which component variances should be returned. By default, both
the conditional and the zero-inflation component are taken into account.
-
-
format_alert()
andformat_warning()
get animmediate
argument, to output
warnings immediately. -
find_terms()
andfind_transformation()
now better cope with inverse
transformations of the response value, such as1/y
. -
get_transformation()
now returns more transformations for power-transformed
response variables. -
model_info()
forMixMod
objects from package GLMMadaptive now recognize
zero-inflation and hurdle models for custom families.
Bug fixes
-
null_model()
now correctly handles zero-inflated models from package
glmmTMB. -
Fixed issue in
null_model()
for models from package GLMMadaptive. -
Fixed issues in
link_inverse()
andlink_function()
for models of class
gamlss
fromLOGNO()
family.