6

Quick question: I have found this tutorial which recommends a two-factorial design for the following setup: three menu items (fixed factor) are tested in six restaurants (random factor). The guide recommends using

aov( response ~ item + restaurant )

I think that the correct way of doing that would be

aov( response ~ item + Error( restaurant / item ) )

I am confused.

My question: am I right, or am I wrong and the author of the tutorial is right?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
January
  • 6,999
  • 1
  • 32
  • 55

2 Answers2

3

That looks right to me! There's a really good tutorial that I use in teaching R courses Baron's Using R for Psychology Experiments. Even if you're not doing psych. experiments, I think they way Baron does a great job explaining ANOVA and the proper use of the Error() function.

Kyle.
  • 1,550
  • 1
  • 11
  • 22
0

Just note

aov( response ~ item + restaurant )

gives the same Anova (same DF and sums of squares for restaurant, item and residuals, so same F test) as

aov( response ~ item + Error( restaurant / item ) )