lm_std | R Documentation |
This runs lm() after standardising all continuous variables, while leaving factors intact.
lm_std(formula, data = NULL, weights = NULL, rename_std = FALSE, ...)
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
weights |
an optional vector of weights to be used in the fitting
process. Should be |
rename_std |
Logical. Should standardised variables be indicated by _sd suffix |
... |
Arguments passed on to
|
In the model call, the weights variable will always be called weights. This might pose a problem when you update the model later on, for the moment the only workaround is to rename the weights variable accordingly (or to fix it and contribute a PR on Github).
See (Fox, 2015) for an argument why dummy variables should never be standardised. If you want to run a model with all variables standardised, one option is 'QuantPsyc::lm.beta()'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.