[R] R ANOVA gives diferent results than SPSS
jp at joepking.com
Thu Feb 11 20:13:11 CET 2010
I have found a similar problem with the ANOVA function in R, I found the
problem is when you specify a variable in SPSS as a random variable instead
of fixed, and R treats all of the factors as fixed.
jp at joepking.com
"Never throughout history has a man who lived a life of ease left a name
worth remembering." --Theodore Roosevelt
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Greg Snow
Sent: Thursday, February 11, 2010 10:45 AM
To: Protzko; r-help at r-project.org
Subject: Re: [R] R ANOVA gives diferent results than SPSS
A couple of possibilities:
The data is not the same, e.g. something in the file was interpreted
differently by the 2 programs, one of the programs may have stopped reading
at an unrecognized value, while the other skipped it and went on. Or it
used to be common to encode missing values as -999, if one program
recognizes that as missing, but you did not tell the other one too, then it
could treat that as a legitimate value.
The model is not the same, e.g. one program may be interpreting your
grouping variable as a continuous variable and the other as categorical,
which would result in 2 very different models and outcomes.
If you show us your data/code/output as has been requested, then we may be
able to tell which it is. Without that information you are expecting either
R or the members of the list to read your mind. I keep making notes to my
future self to use the timetravel package (not written yet, that's why I
need my future self to use it) to send a copy of the esp package (also not
written yet) back in time to me so I can use it for situations like this.
But so far that has not worked (maybe my future self is even more lazy than
my present self, or my near future self does something to offend my far
future self enough that he is unwilling to do this small favor for my
current past self, darn, either way means I should probably do better on the
The short version of the above rambling is that we want to help, but cannot
help you until you help us to help you. Show us your data/code/output (or
data/code/output for simulated/example data if you can't show your real
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Protzko
> Sent: Thursday, February 11, 2010 9:38 AM
> To: r-help at r-project.org
> Subject: Re: [R] R ANOVA gives diferent results than SPSS
> a one-way ANOVA should be a one-way ANOVA I guess, model is simple
> enough I
> thought. The F value seems pretty clear, I'm doing nothing fancy here,
> trying to figure out how to do in R what I'm doing in SPSS.
> View this message in context: http://n4.nabble.com/R-ANOVA-gives-
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help