Skip to content
Prev 2765 / 20628 Next

How many groups is enough?

Graham,

Actually..it turned out that the data set for which the question was 
asked, had about 350 subjects I believe.

But anyway....that is not your question. In general you see the magic 
"5" in some textbooks.....but for what it is worth...I recently had to 
program a ZIP for 2-way nested data in RBugs..and in order to do this, I 
started with 1-way and 2-way GLMMs (just to build up the code). And to 
check whether my code was "correct", I compared the results with that of 
3-4 R packages (e.g. glmmPQL, lmer, glmml).  The data set consisted of 
multiple observations per animal, for 5-30 animals per colony, and 9 
colonies. I noticed that the estimated values for the variance for the 
random intercept colony differed a lot between these packages. But all 
came with similar estimates for the animal-within-colony random intercept.

Not that it tells you that much (all packages giving the same result 
doesn't mean it is correct)....but it is a bit worrying. Perhaps a 
simulation study gives you a better answer. The data I use(d) are highly 
unbalanced..so that may have played a role as well.

Alain