[R] GLM function with poisson distribution

Göran Broström gb at tal.stat.umu.se
Wed Jan 26 13:35:50 CET 2005


On Wed, Jan 26, 2005 at 11:01:03AM +0100, Peter Dalgaard wrote:
> Göran Broström <gb at tal.stat.umu.se> writes:
> 
> > > Try it with
> > > 
> > > b=c(rep(0,8),rmultinom(1,24,rep(1/8,8))) 
> > 
> > This is the conditional distribution, given the sufficient statistic.
> 
> Yes (and that was of course the point). I was surprised that there is
> a difference at all (between this and rep(3,8) and also between
> different calls to rmultinom). 

That surprises me :-) Really, if the observed values are exactly equal to
the predicted values or not must make a difference?

> Theoretically, the MLE should be the same, 

They are exactly the same, being functions of (the same) sufficient
statistic.  

> but of course the "saturated models" have a different
> likelihoods, so the deviances vary and there may be variations in the
> number of iterations taken in the (divergent) fitting process.

The important thing is that the difference between the null and residual
deviances is constant. The 'divergence' is due to the parametrization in
glm only. The estimation problem has a simple closed-form solution. 

-- 
 Göran Broström                    tel: +46 90 786 5223
 Department of Statistics          fax: +46 90 786 6614
 Umeå University                   http://www.stat.umu.se/egna/gb/
 SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se




More information about the R-help mailing list