[R] Different results

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri May 28 00:49:30 CEST 2004


vasilis pappas <vasileios_p at yahoo.gr> writes:

> Hello everybody,
>    I've been practicing with some data in R and SPSS and I noticed that there are some differences in ANOVA results.
>  
> For example with :
> y<-c(1,2,34,2,3,45,2,1,67,3,2,67,2,2,98,4,4,23,1,1,23,2,3,45) and
> x<-rep(c(1,2,3),8)
>  
>    I get in R ( with summary(aov(y~x)) )
> MSres=350.7
> df=22
>  
>    while in SPSS I get
> MSres=221.9
> df=21
>  
> Can enyone explain me what is the problem or what am I doing wrong?

You need  x <- factor(x) , I guess.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list