[R-lang] Re: anova formula repeated measures

Michael T Hammond hammond@U.Arizona.EDU
Fri May 21 16:04:21 PDT 2010


All

Sheepishly, he says....

It turns out that I had an issue in my data frame. (Thanks to Matt
Goldrick for getting me to think about this again.) The problem wasn't a
miscoding per se, but that the design wasn't completely balanced as far as
the between-subjects factor. That is, one group of subjects saw n items
and the other saw n+2. Once I pulled out that extra two items, the
formulas in my email below worked correctly.

I have no idea why that should matter; I would have thought R could
accommodate it, but c'est la vie.

For completeness, the following individuals responded: Klinton Bicknell,
Jeremy Boyd, Matt Goldrick, Jason Gullifer, Scott Jackson, Roger Levy,
Ingo Plag, and Adrian Staub.

The following websites were cited:

	http://psych.wisc.edu/moore//R_Analysis_of_Variance_Handouts_html.html
	http://www.personality-project.org/R/r.anova.html
	http://star.psy.ohio-state.edu/coglab/Demos/r.anova.html

Thanks all!

Mike H.

On Thu, 20 May 2010, Michael T Hammond 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