Giuseppe Pagnoni
2004-Aug-05 14:51 UTC
[R] Post-hoc t-tests in 2-way repeated measure ANOVA
Hi all I am running a 2-way repeated measure anova with 1 between-subjects factor (Group=treatment, control), and 1 within-subject factor (Time of measurement: time1, time2). I extract the results of the anova with: summary(aov(effect ~ Group*Time + Error=Subj/Time, data=mydata)) Now, this must be clearly a dumb question, but how can I quickly extract in R all the post-hoc t-tests for the simple main effects? Also, while I am at it, how do I enter in the model a counfounding covariate (e.g., Age)? And on a different matter, is there a way to receive interactive user input in an R script? Something like "Enter the name of the factor: ", or even more simply "Press <Enter> to see the result of the next analysis".... thanks in advance for any suggestions! giuseppe -- ------------------------ Giuseppe Pagnoni, Ph.D. Dept. of Psychiatry and Behavioral Sciences 1639 Pierce Drive, Suite 4000 WMB Bldg., Atlanta, GA 30322, U.S. phone: 404-712-8431 fax: 404-727-3233 e-mail: gpagnon at emory.edu
Giuseppe Pagnoni
2004-Aug-30 16:14 UTC
[R] Post-hoc t-tests in 2-way repeated measure ANOVA
Hi all I will repost this since it seems to me such a common problem and I couldn't find any solution in the mail list... I am running a 2-way repeated measure anova with 1 between-subjects factor (Group=treatment, control), and 1 within-subject factor (Time of measurement: time1, time2). I extract the results of the anova with: summary(aov(effect ~ Group*Time + Error(Subj/Time), data=mydata)) following the notes of Jonathan Baron. Now,is there a way in R to quickly extract all the post-hoc t-tests for the simple main effects, corrected of course for multiple comparisons? Group1 at Time1 vs Group1 at Time2 Group2 at Time1 vs Group2 at Time2 Group1 at Time1 vs Group2 at Time1 Group1 at Time2 vs Group2 at Time2 Also, how can I enter in the model formula a counfounding covariate (e.g., Age)? thanks in advance for any suggestions! giuseppe -- ------------------------ Giuseppe Pagnoni, Ph.D. Dept. of Psychiatry and Behavioral Sciences 1639 Pierce Drive, Suite 4000 WMB Bldg., Atlanta, GA 30322, U.S. phone: 404-712-8431 fax: 404-727-3233 e-mail: gpagnon at emory.edu
Maybe Matching Threads
- (REPOST) Simple main effects in 2-way repeated measure ANOVA
- arrays of lists in R ("cell arrays" in Matlab)
- power in a specific frequency band
- Newbie question: Statistical functions (e.g., mean, sd) in a "transform" statement?
- merge two dataset and replace missing by 0