Doran, Harold
2008-Aug-01 15:56 UTC
[R] Major difference in the outcome between SPSS and R statisticalprograms
First off, Marc Schwartz posted this link earlier today, read it. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-di splayed-when-using-lmer_0028_0029_003f Second, your email is not really descriptive enough. I have no idea what OR is, so I have no reaction. Third, you're comparing estimates from different methods of estimation. lmer will give standard errors that account for the correlation of individuals within similar units whereas the SPSS procedure will not. The lmer standard errors better capture the true sampling variance of the parameters and SPSS doesn't.> -----Original Message----- > From: Draga, R. [mailto:R.Draga at umcutrecht.nl] > Sent: Friday, August 01, 2008 11:45 AM > To: Doran, Harold > Subject: RE: [R] Major difference in the outcome between SPSS > and R statisticalprograms > > Thanks for the reaction > > I know, I would not expect the outcomes to be the same. > But, I have never before encountered such a difference in > outcomes between SPSS and R; mostly the OR's and p-values > differed a little bit. > > Strange is that R shows a OR of 10,176 and 95% CI of > 6,295-14,056. Then the p-value must be <0.05 doesn't it? > For age the OR's differ dramatically between SPSS and R, > 0.985 and 0.003. > > I just can not explain it. > > Ronald > > -----Oorspronkelijk bericht----- > Van: Doran, Harold [mailto:HDoran at air.org] > Verzonden: vrijdag 1 augustus 2008 17:36 > Aan: Draga, R.; r-help at r-project.org > Onderwerp: RE: [R] Major difference in the outcome between > SPSS and R statisticalprograms > > > The biggest problem is that SPSS cannot fit a generalized linear mixed > model but lmer does. So, why would you expect the GLM in SPSS and the > GLMM in lmer to match anyhow? > > > -----Original Message----- > > From: r-help-bounces at r-project.org > > [mailto:r-help-bounces at r-project.org] On Behalf Of Draga, R. > > Sent: Friday, August 01, 2008 10:19 AM > > To: r-help at r-project.org > > Subject: [R] Major difference in the outcome between SPSS and > > R statisticalprograms > > > > Dear collegues, > > > > I have used R statistical program, package 'lmer', several > > times already. > > I never encountered major differences in the outcome between > > SPSS and R. > > ...untill my last analyses. > > > > Would some know were the huge differences come from. > > > > Thanks in advance, Ronald > > > > In SPSS the Pearson correlation between variable 1 and > > variable 2 is 31% p<0.001. > > > > > > > > In SPSS binary logistic regression gives us an OR=4.9 (95% CI > > 2.7-9.0), p<0.001, n=338. > > > > OR lower upper > > > > gender 1,120 0,565 2,221 > > > > age 0,985 0,956 1,015 > > > > variable 2 4,937 2,698 9,032 > > > > > > > > In R multilevel logistic regression using statistical > package 'lmer' > > gives us an OR=10.2 (95% CI 6.3-14), p=0.24, n=338, groups: > group 1, > > 98; group 2 84. > > > > OR lower upper > > > > gender 2,295 -2,840 7,430 > > > > age 0,003 -70,047 70,054 > > > > variable 2 10,176 6,295 14,056 > > > > > > > > The crosstabs gives us: > > > > variable A > > > > Var B 0 1 > > > > 0 156 108 > > > > 1 17 57 > > > > > > > > Would somebody know how it is possible that in SPSS we get > > p<0.001 and in R we get p=0.24? > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > >
Douglas Bates
2008-Aug-01 20:44 UTC
[R] [R-sig-ME] Major difference in the outcome between SPSS and R statisticalprograms
On Fri, Aug 1, 2008 at 10:56 AM, Doran, Harold <HDoran at air.org> wrote:> First off, Marc Schwartz posted this link earlier today, read it. > > http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-di > splayed-when-using-lmer_0028_0029_003f > > Second, your email is not really descriptive enough. I have no idea what > OR is, so I have no reaction.Perhaps OR is "odds ratio". In a generalized linear model or a generalized linear mixed model for binary responses and using the logit link, the exponentials of the coefficients are scale factors for the odds ratio.> Third, you're comparing estimates from different methods of estimation. > lmer will give standard errors that account for the correlation of > individuals within similar units whereas the SPSS procedure will not. > The lmer standard errors better capture the true sampling variance of > the parameters and SPSS doesn't. > > > >> -----Original Message----- >> From: Draga, R. [mailto:R.Draga at umcutrecht.nl] >> Sent: Friday, August 01, 2008 11:45 AM >> To: Doran, Harold >> Subject: RE: [R] Major difference in the outcome between SPSS >> and R statisticalprograms >> >> Thanks for the reaction >> >> I know, I would not expect the outcomes to be the same. >> But, I have never before encountered such a difference in >> outcomes between SPSS and R; mostly the OR's and p-values >> differed a little bit. >> >> Strange is that R shows a OR of 10,176 and 95% CI of >> 6,295-14,056. Then the p-value must be <0.05 doesn't it? >> For age the OR's differ dramatically between SPSS and R, >> 0.985 and 0.003. >> >> I just can not explain it. >> >> Ronald >> >> -----Oorspronkelijk bericht----- >> Van: Doran, Harold [mailto:HDoran at air.org] >> Verzonden: vrijdag 1 augustus 2008 17:36 >> Aan: Draga, R.; r-help at r-project.org >> Onderwerp: RE: [R] Major difference in the outcome between >> SPSS and R statisticalprograms >> >> >> The biggest problem is that SPSS cannot fit a generalized linear mixed >> model but lmer does. So, why would you expect the GLM in SPSS and the >> GLMM in lmer to match anyhow? >> >> > -----Original Message----- >> > From: r-help-bounces at r-project.org >> > [mailto:r-help-bounces at r-project.org] On Behalf Of Draga, R. >> > Sent: Friday, August 01, 2008 10:19 AM >> > To: r-help at r-project.org >> > Subject: [R] Major difference in the outcome between SPSS and >> > R statisticalprograms >> > >> > Dear collegues, >> > >> > I have used R statistical program, package 'lmer', several >> > times already. >> > I never encountered major differences in the outcome between >> > SPSS and R. >> > ...untill my last analyses. >> > >> > Would some know were the huge differences come from. >> > >> > Thanks in advance, Ronald >> > >> > In SPSS the Pearson correlation between variable 1 and >> > variable 2 is 31% p<0.001. >> > >> > >> > >> > In SPSS binary logistic regression gives us an OR=4.9 (95% CI >> > 2.7-9.0), p<0.001, n=338. >> > >> > OR lower upper >> > >> > gender 1,120 0,565 2,221 >> > >> > age 0,985 0,956 1,015 >> > >> > variable 2 4,937 2,698 9,032 >> > >> > >> > >> > In R multilevel logistic regression using statistical >> package 'lmer' >> > gives us an OR=10.2 (95% CI 6.3-14), p=0.24, n=338, groups: >> group 1, >> > 98; group 2 84. >> > >> > OR lower upper >> > >> > gender 2,295 -2,840 7,430 >> > >> > age 0,003 -70,047 70,054 >> > >> > variable 2 10,176 6,295 14,056 >> > >> > >> > >> > The crosstabs gives us: >> > >> > variable A >> > >> > Var B 0 1 >> > >> > 0 156 108 >> > >> > 1 17 57 >> > >> > >> > >> > Would somebody know how it is possible that in SPSS we get >> > p<0.001 and in R we get p=0.24? >> > >> > >> > [[alternative HTML version deleted]] >> > >> > ______________________________________________ >> > R-help at r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-help >> > PLEASE do read the posting guide >> > http://www.R-project.org/posting-guide.html >> > and provide commented, minimal, self-contained, reproducible code. >> > >> > > _______________________________________________ > R-sig-mixed-models at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models >