[R-lang] Re: anova formula repeated measures

Klinton Bicknell kbicknell@ling.ucsd.edu
Thu May 20 20:40:38 PDT 2010


Hi Mike,

I'm pretty sure that all factors are assumed to be between the relevant grouping unless you specify them in the Error term. Thus, between factors just go in the aov outside the Error term. So, assuming that your 2 factors are within-subjects and between-items, and the third factor is between both, the formulas would look like:

by items: aov(response ~ within1 * within2 * between + Error(item))

by subjects: aov(response ~ within1 * within2 * between + Error(subject/(within1 *within2)))

I.e., the error terms are unchanged from your first formulas.

Cheers,

Klinton


On May 20, 2010, at 18:14 , Scott Jackson wrote:

> Hi Mike :-)
> 
> Non-snarky suggestion: I think you are supposed to include the part of
> the model that does not include the "within" factors again after the
> Error term, so instead of:
> 
> by items (wrong): aov(response ~ within1 * within2 * between +
> Error(item/between))
> try: aov(response ~  (within1 * within2 * between) +
> Error(item/between) + (within1 * within2))
> 
> and instead of : aov(response ~ within1 * within2 * between +
> Error(subject/(within1*within2)))
> try: aov(response ~ (within1 * within2 * between) +
> Error(subject/(within1 * within2)) + (between))
> 
> Snarky suggestion:
> lmer(response ~ within1 * within2 * between + (1|item) + (1|subject))
> lmer(response ~ within1 * within2 * between + (1+between|item) +
> (1+within1*within2|subject))
> ... etc.
> 
> :-)
> 
> I'm actually not 100% positive about the non-snarky suggestion, so let
> me know if it works!
> -scott
> 
> On Thu, May 20, 2010 at 8:33 PM, Michael T Hammond
> <hammond@u.arizona.edu> wrote:
>> all
>> 
>> I am stuck on how to express a simple design for aov().
>> 
>> It's an experiment with two within-subjects factors (phonological
>> properties of my stimuli) and one between-subjects factor (presentation
>> mode: some subjects get things visually, some auditorily). There are
>> multiple subjects of course, and multiple items in each factor and
>> intersection.
>> 
>> If I left out the between-subjects factor, this is the normal way I would
>> do this:
>> 
>> by items: aov(response ~ within1 * within2 + Error(item))
>> 
>> by subjects: aov(response ~ within1 * within2 + Error(subject/(within1 *
>> within2)))
>> 
>> When I add in the between-subjects factor, I can't get the error term
>> right:
>> 
>> by items: aov(response ~ within1 * within2 * between + Error(???))
>> 
>> by subjects: aov(response ~ within1 * within2 * between + Error(???))
>> 
>> I would have thought Error(item/between) and Error(subject/(within1 *
>> within2)) respectively, but this does not work.
>> 
>> I've been searching the web and have not found any examples of this sort
>> of mixed design with aov().
>> 
>> Does anybody have any ideas?
>> 
>> Mike H.
>> 




More information about the ling-r-lang-L mailing list