The model_parameters() function (also accessible via the shortcut parameters()) can also be used to calculate standardized model parameters via the standardize-argument. Recall that standardizing data/variable (z-scoring), i.e. centering and scaling, involves expressing data in terms of standard deviation (i.e., mean = 0, SD = 1). That is, it the process of subtracting the mean and dividing the quantity by standard deviation. Standardization can help avoid multicollinearity issues when more complex (polynomial, for instance) terms are included in the model.

• "refit",
• "posthoc"
• "smart"
• "basic"

If you are interested in more statistical and technical details, and how standardization methods relate to different (standardized) effect size measures, read the following vignette from effectsize package, from whence this functionality comes: https://easystats.github.io/effectsize/articles/standardize_parameters.html

## Standardization by re-fitting the model

standardize = "refit" is based on a complete model re-fit with a standardized version of data. Hence, this method is equal to standardizing the variables before fitting the model. It is the most accurate (Neter et al., 1989), but it is also the most computationally costly and long (especially for heavy models such as, for instance, Bayesian models). This method is particularly recommended for complex models that include interactions or transformations (e.g., polynomial or spline terms).

When standardize = "refit", model_parameters() internally calls effectsize::standardize() to standardize the data that was used to fit the model and updates the model with the standardized data. Note that effectsize::standardize() tries to detect which variables should be standardized and which not. For instance, having a log(x) in the model formula would exclude x from being standardized, because x might get negative values, and thus log(x) would no longer be defined. Factors or dates will also not be standardized. Response variables will be standardized, if appropriate.

library(lme4)
data(iris)
set.seed(1234)

## Smart standardization

standardize = "smart" is similar to standardize = "posthoc" in that it does not involve model re-fitting. The difference is that the SD of the response is computed on the relevant section of the data. For instance, if a factor with 3 levels A (the intercept), B and C is entered as a predictor, the effect corresponding to B versus A will be scaled by the variance of the response at the intercept only. As a results, the coefficients for effects of factors are similar to a Glass’ delta.

model_parameters(model, standardize = "smart")