[R-sig-ME] number of random-effects levels

Andrea Cantieni andrea.cantieni at phsz.ch
Tue Dec 4 15:10:50 CET 2012


Hello

I am fitting a classroom data set with lmer() with completely nested data, i.e. pupils are nested within classes, and classes are nested within schools. I have read about the random effects levels: "...there must be a reasonable number of random-effects levels (e.g. blocks) — more than 5 or 6 at a minimum." (http://glmm.wikidot.com/faq).

The model looks like

fit0 <- lmer(theta ~ (1|CLASSID) + (1|SCHOOLID), data.ml)

and the contingency table looks like

xtabs(~ SCHOOLID, unique(subset(data.ml, select=c(SCHOOLID,CLASSID))))

SCHOOLID
1  2  3  5  6  7  8  9 10 12 13 14 15 16 
5  3  3  4  8  3  1  3  4  2  5  3  3  2 

My question is, whether the reasonable number of random-effects levels of 5 or 6 means the total number of levels (i.e. 49 for CLASSID, and 14 for SCHOOLID) or the numbers of levels for CLASSID within SCHOOLID (i.e. 1 to 8 for CLASSID).

Any idea?

Thanks a lot, 
Andrea

__________________________________________

Andrea Cantieni

Institut für Medien und Schule IMS
Pädagogische Hochschule Zentralschweiz
Hochschule Schwyz
Zaystrasse 42
CH-6410 Goldau

andrea.cantieni at phsz.ch
http://www.ims.phz.ch



More information about the R-sig-mixed-models mailing list