[R] random effect nested within fixed effects (binomial lmer)

lorenz.gygax at art.admin.ch lorenz.gygax at art.admin.ch
Wed Feb 21 12:33:17 CET 2007


> But I recently realized something. Most of the variables that I've  
> tested as fixed effects are properties of the subject (e.g. Race,  
> Gender, etc.). Is it correct to be using a random effect 
> Subject that is nested within (partially-crossed) fixed effects
> like Gender and Race?

Yes. I would even claim that it is necessary. Only if you use subject as a random effect, gender and race are correctly attributed as constant within individuals and are thus treated as 'between-subject' variables. (And thus, basically, the sample on which you can base your gender and race comparisons is the number of individuals).
 
> So today, I accidentally ran a model without the Subject random  
> effect, and the fixed effect of Race was significant for the first  
> time. With the Subject effect included, Race is not significant.

In my view, this is not surprising and can be called pseudo-replication. Every line of your data set is now treated as an independent measure even though the repetition of race and gender for the same individual is, of course, no new, indpendent information. (Here, you base your statistics on the number of observations instead of individuals.)

> This also happens if Race is treated as random, though the effect
> is smaller then.

I do not really see why you would want to do that.

> ... But if there is a real effect of Race, ...

Well, is there? If you conduct your analyses at the proper level, there obviously is no such effect (at least none that is supported statistically). It is of course possible, that there is a weak effect which you might pick up in a larger sample (more individuals tested).

Cheers, Lorenz
- 
Lorenz Gygax
Federal Veterinary Office
Centre for proper housing of ruminants and pigs
Tänikon, CH-8356 Ettenhausen / Switzerland



More information about the R-help mailing list