Re: [R] ANOVA: Does a Between-Subjects Factor belong in the Error Term?
On 7/9/07, Alex Baugh [EMAIL PROTECTED] wrote: I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1 Between-Subjects Factor (SEX). Does anyone know whether the between-subjects factor (SEX) belongs in the Error Term of the aov or not? It does not. If you have between-subjects factors A, B and within-subjects factors X, Y, Z, use: aov( dv ~ a*b*x*y*z + Error(subj/(x*y*z)) The subj/(x*y*z) formula includes subj:x subj:y subj:z and all their interactions as error terms. The effect of a within subject factor 'x' is assessed against the error term subj:x -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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] ANOVA: Does a Between-Subjects Factor belong in the Error Term?
I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1 Between-Subjects Factor (SEX). Does anyone know whether the between-subjects factor (SEX) belongs in the Error Term of the aov or not? And if it does belong, where in the Error Term does it go? The 3 possible scenarios are listed below: e.g., 1. Omit Sex from the Error Term: My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond)), data=locomotor.tab) note: Placing SEX outside the double paretheses of the Error Term has the same statistical outcome effect as omitting it all together from the Error Term (as shown above in #1). 2. Include SEX inside the Error Term (inside Double parentheses): My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond+Sex)), data=locomotor.tab) 3. Include SEX inside the Error Term (inside Single parentheses): My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond)+Sex), data=locomotor.tab) note: Placing SEX inside the single parentheses (as shown above in #3) generates no main effect of Sex. Thus, I'm fairly confident that option #3 is incorrect. Scenarios 1,2, and 3 yield different results in the aov summary. Thanks for your help! Alex -- Alexander T Baugh Institute for Neuroscience Univ. of Texas at Austin Austin, TX 78712 512.475.6164 [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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.
Re: [R] ANOVA: Does a Between-Subjects Factor belong in the Error Term?
Alex Baugh wrote: I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1 Between-Subjects Factor (SEX). Does anyone know whether the between-subjects factor (SEX) belongs in the Error Term of the aov or not? And if it does belong, where in the Error Term does it go? The 3 possible scenarios are listed below: e.g., 1. Omit Sex from the Error Term: My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond)), data=locomotor.tab) note: Placing SEX outside the double paretheses of the Error Term has the same statistical outcome effect as omitting it all together from the Error Term (as shown above in #1). 2. Include SEX inside the Error Term (inside Double parentheses): My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond+Sex)), data=locomotor.tab) 3. Include SEX inside the Error Term (inside Single parentheses): My.aov = aov(Locomotor.Response~(Age*AcousticCond*Sex) + Error (Subject/(Timepoint*Acx.Cond)+Sex), data=locomotor.tab) note: Placing SEX inside the single parentheses (as shown above in #3) generates no main effect of Sex. Thus, I'm fairly confident that option #3 is incorrect. Scenarios 1,2, and 3 yield different results in the aov summary. You don't generally want terms with systematic effects to appear as error terms also, so 3 is wrong. In 2 you basically have a random effect of sex within subject, which is nonsensical since the subjects presumably have only one sex each. This presumably generates an error stratum with 0 DF, which may well be harmless. That leaves 1 as the likely solution. You'll probably do yourself a favour if you learn to expand error terms, a/b == a + a:b, etc.; that's considerably more constructive than trying to think in terms of whether things are inside or outside parentheses. Thanks for your help! Alex __ R-help@stat.math.ethz.ch 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.