[R] Repeated Measure different results to spss

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 10 11:56:07 CEST 2007


We don't know what you are after (or what you did in SPSS), but

> dat <- read.table("mb2.dat", header=TRUE,
                     colClasses=c(rep("factor",3), "double"))
> summary(aov(Score ~ Group * Task + Error(Id), dat))

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:

>
> 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
>

-- 
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



More information about the R-help mailing list