standardize_info: Get Standardization Information

View source: R/standardize_info.R

standardize_infoR Documentation

Get Standardization Information

Description

This function extracts information, such as the deviations (SD or MAD) from parent variables, that are necessary for post-hoc standardization of parameters. This function gives a window on how standardized are obtained, i.e., by what they are divided. The "basic" method of standardization uses.

Usage

standardize_info(model, ...)

## Default S3 method:
standardize_info(
  model,
  robust = FALSE,
  two_sd = FALSE,
  include_pseudo = FALSE,
  verbose = TRUE,
  ...
)

Arguments

model

A statistical model.

...

Arguments passed to or from other methods.

robust

Logical, if TRUE, centering is done by subtracting the median from the variables and dividing it by the median absolute deviation (MAD). If FALSE, variables are standardized by subtracting the mean and dividing it by the standard deviation (SD).

two_sd

If TRUE, the variables are scaled by two times the deviation (SD or MAD depending on robust). This method can be useful to obtain model coefficients of continuous parameters comparable to coefficients related to binary predictors, when applied to the predictors (not the outcome) (Gelman, 2008).

include_pseudo

(For (G)LMMs) Should Pseudo-standardized information be included?

verbose

Toggle warnings and messages on or off.

Value

A data frame with information on each parameter (see parameters_type()), and various standardization coefficients for the post-hoc methods (see standardize_parameters()) for the predictor and the response.

See Also

Other standardize: standardize_parameters()

Examples


model <- lm(mpg ~ ., data = mtcars)
standardize_info(model)
standardize_info(model, robust = TRUE)
standardize_info(model, two_sd = TRUE)


parameters documentation built on Oct. 18, 2024, 5:13 p.m.