Skip to content

Releases: easystats/insight

insight 1.3.0

20 May 12:20
4e1f782
Compare
Choose a tag to compare

Breaking Changes

  • The default option "all" for the effects argument of find_parameters()
    and get_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. Use effects = "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 of find_parameters() and get_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, a variable argument can be passed
    to get_parameters(), which is in turn passed to as.data.frame(), to
    extract parameters more efficiently.

  • The by argument in export_table() now also splits tables when format is
    not "html".

Bug fixes

  • Fixed issue in find_formula() for models of class barts (package dbarts),
    when formula was abbreviated using y ~ ..

insight 1.2.0

23 Apr 06:09
299a5de
Compare
Choose a tag to compare

Breaking Changes

  • The handling of brms models in find_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() and find_random_slopes() now also extract random effects
    names from auxiliary components.

  • find_random() and find_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
    related Component and overwrites former assignments to "conditional".

  • format_table() now includes more effect sizes when formatting column names.

  • get_datagrid() now allows named vectors for arguments length and range,
    to match values with target variables defined in by.

  • get_datagrid() gets a protect_integer argument, to allow a spread of
    values from minimum to maximum of length length, also for integer values.

  • export_table() gets an argument column_names, to change the column names
    of the exported table.

  • model_info() gains a response argument for classes that can be multivariate
    response models that return multiple lists of model information (currently,
    Stan models from rstanarm and brms). If not NULL, only the information
    for one of the response variables is returned.

  • Creating a range of values in a get_datagrid() using by was now simplified
    and works like regular R syntax, e.g. by = "mpg = 20:50".

  • get_predicted() for models of class brmsfit 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 class brmsfit
    when distributional are predicted.

  • find_offset() gets an as_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() and print_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

02 Mar 11:31
ca78e94
Compare
Choose a tag to compare

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 (values NA),
    to work with models that used weights.

  • get_datagrid() gets a digits argument, to round numeric representative
    values.

  • Argument ci_digits defaults to digits in format_table().

  • format_table() gets a select 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() and find_transformation() now also detect
    log-transformation with logarithmic base.

Bug fixes

  • Fixed issue in find_formula(), find_response() and find_predictors() for
    multinomial gam models from package mgcv.

insight 1.0.2

06 Feb 15:01
ce9e7ba
Compare
Choose a tag to compare

Changes

  • get_datagrid() gives a more informative error message when a variable
    specified in by was not found in the data.

  • The by argument in get_datagrid() gets a new token-option, "[sample <number>]",
    to draw a random sample of values.

Bug fixes

  • Option "terciles" and "terciles2" in get_datagrid() were swapped, i.e.
    "terciles" was doing what was documented for "terciles2" and vice versa.
    This has been fixed.

  • include_random in get_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 class brmsfit that included
    monotonic effects.

insight 1.0.1

10 Jan 06:54
fedd7d8
Compare
Choose a tag to compare

General

  • Support for models of class oohbchoice (package DCchoice).

  • format_table() gets a stars_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() and has_intercept() for brms models
    with 0 + Intercept formula notation.

  • Fixed issues in get_statistic() for models of class fixest from
    negative-binomial families.

  • Fixed issue with as.numeric() method for get_sigma().

  • get_datagrid() now only returns valid levels when include_random = TRUE
    and group-level factor in random effects is numeric.

insight 1.0.0

26 Nov 14:48
2e997de
Compare
Choose a tag to compare

Breaking changes

  • All deprecated arguments have been removed.

  • The table_width argument in export_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() and get_transformation() now also detects use of
    divisions, like x/3 or Box-Cox transformations (like (x^lambda - 1) / lambda).

  • find_transformation() and get_transformation() get a include_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 for match.arg() with
    more informative error message.

  • The function to calculate the corrections for likelihood-values when the
    response-variable is transformed is now exported as get_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, argument checks now allows to specify for which possibly
    problematic formula notation should be checked.

  • format_value() gains a decimal_point argument, to change the decimal point
    in output conversion.

  • format_bf() with stars = 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() and compact_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

02 Oct 08:50
c0b5fbf
Compare
Choose a tag to compare

General

  • get_datagrid() can now be used to extract the "grid" information from
    {emmeans} and {marginaleffects} outputs.

  • Arguments na.rm and na_rm are deprecated throughout the package's functions.
    Instead, use remove_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

02 Sep 04:39
1873586
Compare
Choose a tag to compare

New supported models

  • Support for models of classes glm_weighit, multinom_weightit and
    ordinal_weightit (package WeightIt).

Changes

  • null_model() and formula_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() and link_inverse().

Bug fixes

  • Fixed regression from latest fix related to get_variance() for brms models.

  • Fixed issue in link_function() and link_inverse() for models of class
    cglm with "identity" link, which was not correctly recognized due to a
    typo.

insight 0.20.3

16 Aug 11:33
524d385
Compare
Choose a tag to compare

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() and find_variables()
    for models from package brms with custom formulas.

  • Fixed issues in find_response() for brms models with mi() 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 (like mo()).

  • Fixed issue in ellipses_info() when this function was called from do.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

13 Jul 16:27
94af4cb
Compare
Choose a tag to compare

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. If NULL, 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() and format_warning() get an immediate argument, to output
    warnings immediately.

  • find_terms() and find_transformation() now better cope with inverse
    transformations of the response value, such as 1/y.

  • get_transformation() now returns more transformations for power-transformed
    response variables.

  • model_info() for MixMod 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() and link_function() for models of class
    gamlss from LOGNO() family.