3

In my statistics lectures it is mentioned that for balanced data (same number of participants in each block), the results will be the same whether the model is fitted with factor A as a fixed effect or a random effect. For example:

lme(effort ~ Type, random = ~1|Subject)

will give me the same answer as

lm(effort~ Type + Subject)

By contrast, it is mentioned that with unbalanced data, the results will not be the same.

What is meant by 'same answer'. If I run both models I get two different outputs. What is the same?

  • Welcome to the site! Please note that signing posts is considered redundant here because the site engine automatically places your profile flair under your posts. –  Oct 17 '12 at 23:38

1 Answers1

3

With a simple, balanced design, you can build an anova table with sums of squares and mean squares - whether Subject is random or not. lm and lme give the same residual mean square error. But you would do a different F test for the significance of Type. In the fixed effect case, you use mean square (Type)/residual mean square. With a random effect, the F test is Type over Subject.

In an unbalanced design, lme estimates the effects and variance component differently from lm, so you get different results.

Placidia
  • 14,361