scaled.coef {mpae}R Documentation

Scaled (standardized) coefficients

Description

Computes the standardized (regression) coefficients, also called beta coefficients or beta weights, to quantify the importance (the effect) of the predictors on the dependent variable in a multiple regression analysis where the variables are measured in different units.

Usage

scaled.coef(object, ...)

## Default S3 method:
scaled.coef(object, scale.response = TRUE, complete = FALSE, ...)

Arguments

object

an object for which the extraction of model coefficients is meaningful.

...

further arguments passed to or from other methods.

scale.response

logical indicating if the response variable should be standardized.

complete

for the default (used for lm, etc) and aov methods: logical indicating if the full coefficient vector should be returned also in case of an over-determined system where some coefficients will be set to NA.

Details

The beta weights are the coefficient estimates resulting from a regression analysis where the underlying data have been standardized so that the variances of dependent and explanatory variables are equal to 1. Therefore, standardized coefficients are unitless and refer to how many standard deviations a dependent variable will change, per standard deviation increase in the predictor variable. See https://en.wikipedia.org/wiki/Standardized_coefficient or QuantPsyc::lm.beta.

Based on QuantPsyc::lm.beta.

Value

A named vector with the scaled coefficients.

See Also

coef()

Examples

fit <- lm(fidelida ~ velocida + calidadp, hbat)
coef(fit)
scaled.coef(fit)
fit2 <- lm(scale(fidelida) ~ scale(velocida) + scale(calidadp), hbat)
coef(fit2)
fit3 <- lm(fidelida ~ scale(velocida) + scale(calidadp), hbat)
coef(fit3)
scaled.coef(fit, scale.response = FALSE)

[Package mpae version 0.1.2 Index]