Hello,

Try function Anova() in package car.

#install.packages("car")
library(car)

?Anova  # see argument 'type'


Hope this helps,

Rui Barradas

Em 20-02-2013 09:08, Anders Sand escreveu:
Hi,

I know this question has been asked before but I have not seen an answer
pertaining to repeated measures anovas.

I got a simple data set with two factors: block (3 levels) and prime (2
levels). The dataset (expData) are stuctured so one column (block) states
which block a trial is in and one column (prime) states which prime was
used in the trial, another column (RT) states reation time for that trial
and finally a column (subject) states subject number (there are 10 trials
in each condition and 30 subjects so the dataset consists of 1800 obs of 4
variables).

I tried doing this repeated-measures ANOVA in SPSS which results in a
F-value of 25 for factor block and F-value 43 for factor prime.

I then try to reproduce this result in R. First I factor block and prime so
that R knows these are factors and not continous variables.

My anova command in R is aov(expData$RT ~ block * prime +
Error(expData$subject  /(block * prime))

This gives me a very different result, F-values for block is 2.9 and
F-value for prime is 5.7.

I think this difference is caused by the "type" of Sum of squares test used
in SPSS and R. So, I want to use type 3 test in R.

Is this correct and how do I apply this change in type? The aov function
does not take any type arguments.

Much appreciated.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to