Skip to content

parameters 0.31.0

Latest

Choose a tag to compare

@strengejacke strengejacke released this 01 Dec 14:55
· 3 commits to main since this release
b45e0d4

Breaking Changes

  • compare_parameters()'s ci_method now defaults to NULL, so the value is
    potentially set by the models' unique methods.

  • model_parameters(), ci(), standard_error(), and p_value() now default
    to the Satterthwaite approximation for lmerModLmerTest models and suggest
    doing so for lmerMod models (#989).

Changes

  • model_parameters() for models from blavaan with standardize no longer
    returns rows for parameters with fixed or constant standardized draws, such
    as the standardized variances of exogenous latent variables. print() now
    says that the parameters are standardized and names the type. The output now
    also drops p_significance, because its result depends on the scale of the
    parameters. Version 0.30.0 already dropped the ROPE tests and Bayes factors.
    Test names now match as in bayestestR. If you give these tests in other
    spellings, for example test = "ROPE", the output also drops them. If
    verbose = TRUE, an explicit diagnostic other than NULL, FALSE or
    "none" now gives a warning, because the standardized draws have no chain
    information. ci_method = "si" now gives an error.

  • For mixed models without their own bootstrap method, bootstrap_model() now
    resamples whole clusters instead of single rows, with type = "ordinary"
    (the default) or type = "balanced". Examples are models from
    ordinal, cplm or nlme. This also changes bootstrap_parameters() and
    model_parameters() with bootstrap = TRUE. Grouping factors that are not
    nested in one factor give an error.

  • model_parameters() for objects from emmeans supports p_adjust = "mvt",
    which adjusts p-values based on the multivariate t distribution (#854).

  • model_parameters() uses variable labels for coefficients in multcomp
    hypothesis labels (#1139).

Bug fixes

  • model_parameters() for emmGrid objects now correctly uses the family size
    instead of the stratum count when applying Tukey p-value adjustments
    (p_adjust = "tukey"), ensuring consistency with emmeans.

  • The footer of printed model_parameters() output with include_info = TRUE
    now labels the R2 values of brms and rstanarm models, as "Conditional
    R2" and "Marginal R2" for mixed models and as "R2" otherwise. Before, the
    values had no labels, for example : 0.842; : 0.656. The values were
    correct (#1271).

  • model_parameters() with standardize (other than "refit") returned wrong
    standardized coefficients when only some parameters were kept, for example
    with keep, parameters or component. The kept rows were scaled with the
    standard deviations of other parameters. For models with one set of
    parameters per response level, such as nnet::multinom(), all levels after
    the first were not standardized. For glmmTMB models with zero-inflation,
    component = "zi" gave an error.

  • model_parameters() for BayesFactor objects with more than one model, for
    example from regressionBF() or anovaBF(), now shows the Bayes factor of
    the first model in every row. The parameters also come from that model. Before
    this fix, the rows showed the Bayes factors of all models (#1084).

  • bootstrap_model() with type = "parametric" no longer fails for models
    without their own bootstrap method, such as lm or glm. It now draws new
    responses with simulate() and refits the model to them. Two kinds of model
    give an error that suggests type = "ordinary". In the first kind,
    simulate() has no method, fails, or does not return one numeric response
    per row. In the second kind, the response in the formula is not one column
    of the data, for example log(y) or cbind().

  • Fixed issue where bootstrap_parameters() and model_parameters() with
    bootstrap = TRUE mislabeled the zero-inflation parameters of glmmTMB
    models. bootstrap_model() now adds the suffix _zi to these parameters,
    and bootstrapped output no longer includes dispersion parameters (#1284).

  • The p_adjust argument in model_parameters() now accepts the methods from
    stats::p.adjust.methods in any letter case, for example "bh". Before,
    this failed with an error. An invalid value for p_adjust no longer shows the
    method in the footer of the printed output (#854).

  • Fixed issue where standard_error() returned NULL for objects from
    datawizard::skewness() and datawizard::kurtosis().

  • Fixed issue where standardize_info(), standardize_parameters() and
    standardize_posteriors() returned wrong values for brmsfit models. With
    method = "posthoc" or "smart", untransformed continuous predictors were
    not multiplied by their SD. With method = "smart", factor, character and
    logical predictors of linear models used the SD of the whole response, unlike
    the same model from lm(). With a transformed term, such as log(x),
    method = "posthoc" and "smart" now revert to "basic" with a message, as
    for lm(). The values for interaction terms and for terms that are converted
    in the formula, such as log(x) or factor(x), can still be wrong. The same
    is true for predictors that follow such a term (#1243).

  • model_parameters() for multivariate models, for example
    lm(cbind(y1, y2) ~ x), now gives an error with a post-hoc standardize
    method such as "posthoc", "basic" or "smart", as standardize_parameters()
    already did. Before this fix, the results were wrong and no warning was shown.
    The rows of the first response used the standard deviation of all responses
    pooled. The rows of the other responses were not standardized.
    standardize = "refit" still works for these models (#707).

  • ci() with method = "boot" and model_parameters() with ci_method = "boot"
    for glmmTMB models now give a message that this method only works for merMod
    models. Before this fix, they returned Wald intervals with no message. The
    footer of the printed output said that the intervals were from a parametric
    bootstrap. The values do not change. To bootstrap these models, use
    bootstrap_parameters() or bootstrap = TRUE.

  • Fixed issue where standardize_parameters() and standardize_info() with
    method = "smart" returned wrong values for factor, character and logical
    predictors. If the first row of the data was at another level, the effects
    were scaled by the response SD at that level. They are now scaled by the
    response SD at the reference level. For example, lm(mpg ~ factor(cyl), mtcars)
    gave -4.76 for factor(cyl)6, and now gives -1.53. Sum and Helmert contrasts
    have no reference level and do not change.

  • Fixed issue where model_parameters() with ci_method = "boot" for lme4
    models ignored iterations. The bootstrapped confidence intervals of the
    fixed effects and the random effect variances always used 500 replicates.
    They now use iterations, so calls that do not set it use the documented
    default of 1000 replicates. ci() still defaults to 500.