Skip to content
Prev 72894 / 398498 Next

Is it possible to use glm() with 30 observations?

The issue is not 30 observations but whether it is possible to 
perfectly separate the two possible outcomes.  Consider the following:

tst.glm <- data.frame(x=1:3, y=c(0, 1, 0))
glm(y~x, family=binomial, data=tst.glm)

tst2.glm <- data.frame(x=1:1000,
                      y=rep(0:1, each=500))
glm(y~x, family=binomial, data=tst2.glm)

	  The algorithm fits y~x to tst.glm without complaining for tst.glm, 
but issues warnings for tst2.glm.  This is called the Hauck-Donner 
effect, and RSiteSearch("Hauck-Donner") just now produced 8 hits.  For 
more information, look for "Hauck-Donnner" in the index of Venables, W. 
N. and Ripley, B. D. (2002) _Modern Applied Statistics with S._ New 
York: Springer.  (If you don't already have this book, I recommend you 
give serious consideration to purchasing a copy.  It is excellent on 
many issues relating to statistical analysis and R.

	  Spencer Graves
Kerry Bush wrote: