[R] (REPOST) Simple main effects in 2-way repeated measure ANOVA

Giuseppe Pagnoni gpagnon at emory.edu
Mon Aug 9 17:19:26 CEST 2004


Dear Prof. Ripley

I am sorry that reposting the mail was perceived as not complying to the 
correct list etiquette: I do not usually frequent the list and I just 
thought that the message went unnoticed.  I apologize for the insistence.

On the subject matter of the e-mail, yes, there was a typo, the error 
term was indeed Error(Subj/Time).  But I am still interested in 
examining the simple main effects, when the interaction of Time and 
Group is significant:

Time:
------
ControlGroup: before vs after
TreatmentGroup: before vs after

Group:
------
Before:  ControlGroup vs TreatmentGroup
After: ControlGroup vs TreatmentGroup

Is this incorrect statistical praxis?  Other software packages display 
the results for the above tests after the ANOVA.  However, I couldn't 
find a simple way to extract this information in R.

Also, I am not sure how to include a confounding variable, like Age, in 
the formulation of the model.


Thanks for your help

                giuseppe





Prof Brian Ripley wrote:

>Why has this been REPOSTed?  It was delivered last Thursday.
>
>On Sun, 8 Aug 2004, Giuseppe Pagnoni wrote:
>
>  
>
>>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))
>>    
>>
>
>That's not valid syntax for an R formula. Did you mean Error(Subj/Time)?
>
>  
>
>>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?
>>    
>>
>
>I very much hope you cannot, as you have specified an interaction, and
>you should not want t-tests for main effects in the presence of an 
>interaction, and certainly not with the default R coding.
>
>Did you mean Group + Time?
>
>  
>
>>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"....
>>    
>>
>
>?readline, or cat + scan or ... using connections.
>
>  
>


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




More information about the R-help mailing list