[R] difference in results from R vs SPSS

Fiona Sammut fiona.sammut at um.edu.mt
Sat Jun 24 13:07:37 CEST 2006


Hi all,

1.  I am doing some data analysis using both R and SPSS, to get used to 
both software packages.  I had performed linear regression in R and SPSS 
for a number of times before this last one and the resulting coefficient 
values always matched.  However, this last data set I was analyzing 
using simple linear regression and using the command lm(y~x), gave me 
different readings from R and SPSS:

R:                y= 33.803 + 6.897x

SPSS:             y= 47.589 + 6.263x


I have no doubts regarding the procedure employed in SPSS and I am sure 
I am using the same dataset for both software packages.


2.  Correct me if I am wrong, but from what I've read, it seems that the 
command /anova /in R works out an analysis of variance without including 
the intercept.  Is that so?  Cause again I am working out an anova in R 
and SPSS and I got different resulting sums of squares and different 
degrees of freedom.  I thought this was because one package is working 
with an intercept and the other isn't.

Can anyone enlighten me as to what might have happened in both 1. and 2. 
please?  Are they both due to my poor knowledge of R or could occurences 
as above happen?


3.  I would like a reference to a command which can be used to fit a 
distribution to a disrete distribution.


Thanks in advance for your consideration.

- Fiona Sammut




More information about the R-help mailing list