[R] type 3 aov for repeated measures
ruipbarradas at sapo.pt
Wed Feb 20 11:47:06 CET 2013
Try function Anova() in package car.
?Anova # see argument 'type'
Hope this helps,
Em 20-02-2013 09:08, Anders Sand escreveu:
> 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
> 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 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