lm.beta: Beta regression coefficients

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculating the standardized (beta) regression coefficients of linear models

Usage

1
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

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 β 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 β values do not make any sense for dummy variables since they cannot change by a standard deviation.

Value

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

Author(s)

Thomas Wieland

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

Example output

Call:
lm(formula = y ~ x1 + x2)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.51249 -0.26796  0.01776  0.24690  0.48131 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.58278    0.07710   7.559  2.3e-11 ***
x1          -0.08612    0.10690  -0.806    0.422    
x2          -0.03125    0.09797  -0.319    0.750    
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

Residual standard error: 0.294 on 97 degrees of freedom
Multiple R-squared:  0.007463,	Adjusted R-squared:  -0.013 
F-statistic: 0.3647 on 2 and 97 DF,  p-value: 0.6954

$x1
[1] -0.08157632

$x2
[1] -0.03230011

REAT documentation built on Sept. 5, 2021, 5:18 p.m.