[R] Standardized beta-coefficients in regression

Jeroen Ooms jeroenooms at gmail.com
Mon Sep 26 05:26:39 CEST 2011


Unfortunately I found myself in the same position as outlined above, where I
was requested to reproduce 'standardized regression coefficients' as
reported by SPSS. Below an example that produces something very similar to
the results table from an SPSS "Linear Regression" procedure, including the
standardized regression coefficients:

mylm <- lm(Sepal.Width ~ ., data=iris, x=TRUE, y=TRUE)
sd.x <- sd(mylm$x);
sd.y <- sd(mylm$y);
std.coef <- coef(mylm) * (sd.x / sd.y);
coef.table <- as.data.frame(summary(mylm)$coefficients);
coef.table <- cbind(coef.table, std.coef);
print(coef.table);

I do agree with B.R. but unfortunately the life of an applied statistician
is complex sometimes :-)

--
View this message in context: http://r.789695.n4.nabble.com/Standardized-beta-coefficients-in-regression-tp791616p3842631.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list