David G
2012-Sep-02 11:40 UTC
[R] aov(rt~(F1*F2*F3)+Error(s/(F1*F2*F3)), three_way) question + data
Dear list members, I am picking up some experimental data that was collected last year and analysed using a within subject repeated measure ANOVA using SPSS (glm). There are 3 factors (F1, F2, F3), each with 2 levels (foc - per; on - off; l - r) recorded within a balanced 2x2x2 design. I want to rerun the analysis, using R as I no longer have access to SPSS. Current attempts have produced different results to previous SPSS runs so I am requiring a bit of help to ensure I am using the right R code/re-ordering the data correctly: Attached is the original matrix data used for the SPSS analysis (mean RTs 0811 rnabble) http://r.789695.n4.nabble.com/file/n4641999/mean_RTs_0811_rnabble.csv mean_RTs_0811_rnabble.csv . I understand that the data needs to be formatted length wise, which is also attached (three_way rnabble) http://r.789695.n4.nabble.com/file/n4641999/three_way_rnabble.csv three_way_rnabble.csv . The data represents mean reaction times for each subject across conditions. I want (I think) to run a repeated measures within subject ANOVA in order to test main effects of 3 factors as well as any between factor interactions. The R code that I have used so far (but I am not sure it is the correct way to get what I want) is: three_way <- read.csv(file.choose(),header=TRUE) three_way aov.3way=aov(Reaction_time~(F1*F2*F3)+Error(Subject/(F1*F2*F3)),three_way) summary (aov.3way) This give the reading of significant main effect of F1 (p=0.001) and F2 (p=0.026), with no main effect of F3. There are no interactions. These results are different to that of SPSS which were: F1 = (p=0.001), F2 (0.031), no main effect for F3. There was an interaction: F1*F3 (p=0.042). Question: Am I using the most appropriate R code for this? Many thanks in advance. Best wishes, David -- View this message in context: http://r.789695.n4.nabble.com/aov-rt-F1-F2-F3-Error-s-F1-F2-F3-three-way-question-data-tp4641999.html Sent from the R help mailing list archive at Nabble.com.