# one-way within subjects anova [duplicate]

Consider an experiment where subjects reaction times are measured in three conditions. Because every subject participates in each condition, this is a typical within-subjects design. Now I'm wondering if a one-way within subjects anova is completely equivalent to a two-way anova with subject as the second factor. I already read some chapters on this topic but the difference between both procedures was never discussed explicitly.So,

1. Is there an advantage of using one compared to the other?
2. Is a multilevel approach with subject as the random effect and condition as a fixed effect even better?
3. What if an effect of time is assumed, (e.g. fatigue). Could this be modelled additionally as a "third" factor?

I know these are pretty vague/broad questions but I hope you could give me some hints anyway.

The problem with using subject as a factor in an ANOVA is that you use many degrees of freedom to estimate the effect of subject. Instead of doing that, you could just treat the subject as random and estimate a variance component to account for the by-subject variability (which is assumed to be normally distributed). The multi-level approach is more parsimonious.

You could also refer to my answer here regarding analyzing reaction times with mixed-effects (or multi-level) models.

• thanks, and why exactly is the use of many degrees of freedom unfavorable? Jan 14, 2014 at 14:42
• Like I said above, it's more parsimonious to model just a random effect by subject. Think about Occam's razor, the same logic applies here. You're creating a simpler model that accomplishes everything a more complex model does, without the difficulty of interpreting a categorical factor of N - 1 groups when it's not of substantive interest. Jan 14, 2014 at 15:14
• Allocating degrees of freedom to the subject effect also decreases the model's power to detect differences in the condition effect. Jan 15, 2014 at 16:01

I recommend Gelman (2005) for a discussion of fixed vs. random effects in ANOVA.

The two models are not completely equivalent. Both will produce very similar F-tests for condition and the same least squares means for condition. However, the standard errors of the least squares means will be different. Because of this, the pairwise comparisons of the 3 conditions may be different.

The answer to questions 1 and 2 depends on your objectives. The mixed model with condition as a fixed effect and subject as a random effect is "broad inference" in the sense that the subject effect is built into the model's estimates. The two-way fixed effects model has narrower inference. It will generally be more powerful; however, it assumes that there is no condition*subject interaction, which it sounds like you do not have enough degrees of freedom to test for. The fixed effects model also allows you to compare subjects with each other.

If you wish to make inferences to the population from which subjects were drawn then use the mixed model. If your inferences will be confined to the subjects in the study and you have no reason to suspect non-additivity between conditions and subjects then use the fixed effects model.

For question 3: Yes, there is no apparent reason why you cannot model the 3rd factor. If it is numerical then you might wish to use it as a covariate (be sure to check for linearity).

• thanks for your help. And why do the standard errors of the least squares means differ? Jan 14, 2014 at 15:03
• They differ because they incorporate different variance components. The mixed model has 2 variance parameters: one for subjects and one for residual error. The fixed effects model only has one for residual error. Jan 15, 2014 at 16:06