Skip to content

Repeated Measure different results to spss

3 messages · mb2, Brian Ripley, Peter Dalgaard

mb2
#
Hi, 

I have some problems with my repeated measures analysis. When I compute it
with SPSS I get different results than with R. Probably I am doing something
wrong in R. 
I have two groups (1,2) both having to solve a task under two conditions
(1,2). That is one between subject factor (group) and one within subject
factor (task). I tried the following:
 
 aov(Score ~factor(Group)*factor(Task)+Error(Id)))
 aov(Score ~factor(Group)*factor(Task))
but it leads to different results than my spss. I definitely miss some point
here .

Thanks for you help. 

Id	Group	Task	Score
1	1	1	0.39
2	1	1	0.48
3	1	1	0.59
4	1	1	0.33
5	1	1	0.38
6	1	1	0.37
7	1	1	0.47
8	1	1	0.2
9	1	1	0.29
10	1	1	0.41
11	1	1	0.24
12	1	1	0.28
13	1	1	0.32
14	1	1	0.26
15	2	1	0.65
16	2	1	0.41
17	2	1	0.62
18	2	1	0.39
19	2	1	0.81
20	2	1	0.34
21	2	1	0.32
22	2	1	0.33
23	2	1	0.33
24	2	1	0.38
1	1	2	0.46
2	1	2	0.27
3	1	2	0.41
4	1	2	0.13
5	1	2	0.41
6	1	2	0.36
7	1	2	0.32
8	1	2	0.33
9	1	2	0.44
10	1	2	0.36
11	1	2	0.2
12	1	2	0.3
13	1	2	0.27
14	1	2	0.4
15	2	2	0.35
16	2	2	0.37
17	2	2	0.34
18	2	2	0.24
19	2	2	0.44
20	2	2	0.34
21	2	2	0.4
22	2	2	0.28
23	2	2	0.32
24	2	2	0.33
#
We don't know what you are after (or what you did in SPSS), but
colClasses=c(rep("factor",3), "double"))
would seem to be the sort of thing your description indicates.

If you tell us what you are looking for (and why) we may be able to tell 
you how to get it in R.
On Tue, 10 Jul 2007, mb2 wrote:

            

  
    
#
mb2 wrote:
Did you mean Error(factor(Id)) ?

With that modification, things look sane. Can't vouch for SPSS...

(As a general matter, I prefer to do the factor conversions up front,
rather than inside model formulas.)