[R] Different result of multiple regression in R and SPSS

J. seoulseoulseoul at gmail.com
Tue Jul 19 23:39:58 CEST 2011


Hi, I am trying to do a simple multiple regression analysis that has one
nominal variable (gender) and three numeric variables as independent
variables and one numeric variable as dependent variable.

So, I got a formula like this:
summary(out.3 <- lm(scale(DV) ~  gender + scale(IV.1) + scale(IV.2) +
scale(IV.3))

I tried to compare the outcome in R with the outcome in SPSS and found the
results are different!
I found that R and SPSS have the exact same outcome when every variable is
numeric; however, whenever I included "gender (0/1)" variable in the
equation, the result become different.

I guess that SPSS automatically treat gender as a numeric variable and
standardize it when running analysis. So, I tried to change "gender" to a
numeric variable and ran analysis but the results were still not identical.

What is the problem here and what is the right way to do this analysis?
Thanks,

Jay Yang

--
View this message in context: http://r.789695.n4.nabble.com/Different-result-of-multiple-regression-in-R-and-SPSS-tp3679423p3679423.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list