Hi, I use SPSS at work and have R installed both at work and on my home machine. I've been trying to do some logistic regressions in R and SPSS, but the results I'm getting are different. I've followed a few R tutorials, and with most of them, I get the following instructions: result <- glm(z ~ x + y, family=binomial(logit)) In the case above, with three variables (z being dependent). In SPSS, I'm told to use Analyze -> Regression -> Binary Logistic, where I put x, y in "Covariates" and z in "Dependent". Note that my values for x and y are either 1 or 0. The results I get from these two tests are different, however, and I was wondering why. Am I choosing the wrong commands? If not, why are the results different? Any help would be greatly appreciated, and please note that I have a limited amount of stats knowledge. Thanks, Wojciech -- Five Minutes to Midnight: Youth on human rights and current affairs http://www.fiveminutestomidnight.org/ [[alternative HTML version deleted]]
On Wed, 24 May 2006, Wojciech Gryc wrote:> Hi, > > I use SPSS at work and have R installed both at work and on my home machine. > I've been trying to do some logistic regressions in R and SPSS, but the > results I'm getting are different. I've followed a few R tutorials, and with > most of them, I get the following instructions: > > result <- glm(z ~ x + y, family=binomial(logit)) > > In the case above, with three variables (z being dependent). > > In SPSS, I'm told to use Analyze -> Regression -> Binary Logistic, where I > put x, y in "Covariates" and z in "Dependent". Note that my values for x and > y are either 1 or 0. > > The results I get from these two tests are different, however, and I was > wondering why. Am I choosing the wrong commands? If not, why are the results > different? Any help would be greatly appreciated, and please note that I > have a limited amount of stats knowledge.If you show us an example and both outputs we may be able to help. `the results I'm getting are different' covers too many possibilities. (Please see the posting guide for how to prepare a question like this.) -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Are you sure you are using the same contrasts in SPSS? You could have supplied us with your spss syntax. Marwan ---------------------------------------------- Marwan Khawaja http://staff.aub.edu.lb/~mk36 ----------------------------------------------> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Wojciech Gryc > Sent: Thursday, May 25, 2006 12:41 AM > To: r-help at stat.math.ethz.ch > Subject: [R] Logistic Regression - Results? > > Hi, > > I use SPSS at work and have R installed both at work and on > my home machine. > I've been trying to do some logistic regressions in R and > SPSS, but the results I'm getting are different. I've > followed a few R tutorials, and with most of them, I get the > following instructions: > > result <- glm(z ~ x + y, family=binomial(logit)) > > In the case above, with three variables (z being dependent). > > In SPSS, I'm told to use Analyze -> Regression -> Binary > Logistic, where I put x, y in "Covariates" and z in > "Dependent". Note that my values for x and y are either 1 or 0. > > The results I get from these two tests are different, > however, and I was wondering why. Am I choosing the wrong > commands? If not, why are the results different? Any help > would be greatly appreciated, and please note that I have a > limited amount of stats knowledge. > > Thanks, > Wojciech > > -- > > Five Minutes to Midnight: > Youth on human rights and current affairs > http://www.fiveminutestomidnight.org/ > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html >