Description Usage Arguments Details Value Note References Examples

Returns the standardized beta coefficients, std. error and confidence intervals of a fitted linear (mixed) models.

1 2 3 4 5 6 7 8 9 10 |

`fit` |
Fitted linear (mixed) model of class |

`...` |
Currently not used. |

`ci.lvl` |
Numeric, the level of the confidence intervals. |

`type` |
If |

“Standardized coefficients refer to how many standard deviations a dependent variable will change, per standard deviation increase in the predictor variable. Standardization of the coefficient is usually done to answer the question of which of the independent variables have a greater effect on the dependent variable in a multiple regression analysis, when the variables are measured in different units of measurement (for example, income measured in dollars and family size measured in number of individuals).” (Source: Wikipedia)

A `tibble`

with term names, standardized beta coefficients,
standard error and confidence intervals of `fit`

.

For `gls`

-objects, standardized beta coefficients may be wrong
for categorical variables (`factors`

), because the `model.matrix`

for
`gls`

objects returns the original data of the categorical vector,
and not the 'dummy' coded vectors as for other classes. See, as example:

`head(model.matrix(lm(neg_c_7 ~ as.factor(e42dep), data = efc, na.action = na.omit)))`

and

`head(model.matrix(nlme::gls(neg_c_7 ~ as.factor(e42dep), data = efc, na.action = na.omit)))`

.

In such cases, use `to_dummy`

to create dummies from
factors.

Wikipedia: Standardized coefficient

Gelman A. 2008. Scaling regression inputs by dividing by two standard deviations. *Statistics in Medicine 27: 2865–2873.* http://www.stat.columbia.edu/~gelman/research/published/standardizing7.pdf

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# fit linear model
fit <- lm(Ozone ~ Wind + Temp + Solar.R, data = airquality)
# print std. beta coefficients
std_beta(fit)
# print std. beta coefficients and ci, using
# 2 sd and center binary predictors
std_beta(fit, type = "std2")
# std. beta for mixed models
library(lme4)
fit1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
std_beta(fit)
``` |

sjstats documentation built on July 11, 2018, 9:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.