Learn R Programming

REAT (version 3.0.3)

lm.beta: Beta regression coefficients

Description

Calculating the standardized (beta) regression coefficients of linear models

Usage

lm.beta(linmod, dummy.na = TRUE)

Arguments

linmod

A lm object (linear regression model) with more than one independent variable

dummy.na

logical argument that indicates if dummy variables should be ignored when calculating the beta weights (default: TRUE). Note that beta weights of dummy variables do not make any sense

Value

A list containing all independent variables and the corresponding standardized coefficients.

Details

Standardized coefficients (beta coefficients) show how many standard deviations a dependent variable will change when the regarded independent variable is increased by a standard deviation. The \(\beta\) values are used in multiple linear regression models to compare the real effect (power) of the independent variables when they are measured in different units. Note that \(\beta\) values do not make any sense for dummy variables since they cannot change by a standard deviation.

References

Backhaus, K./Erichson, B./Plinke, W./Weiber, R. (2016): “Multivariate Analysemethoden: Eine anwendungsorientierte Einfuehrung”. Berlin: Springer.

Examples

Run this code
# NOT RUN {
x1 <- runif(100)
x2 <- runif(100)
# random values for two independent variables (x1, x2)
y <- runif(100)
# random values for the dependent variable (y)
testmodel <- lm(y~x1+x2)
# OLS regression
summary(testmodel)
# summary
lm.beta(testmodel)
# beta coefficients
# }

Run the code above in your browser using DataLab