[R] glm questions --- saturated model

David Firth d.firth at warwick.ac.uk
Tue Mar 16 16:44:30 CET 2004


On Tuesday, Mar 16, 2004, at 14:51 Europe/London, BXC (Bendix 
Carstensen) wrote:

>> -----Original Message-----
>> From: r-help-bounces at stat.math.ethz.ch
>> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of David Firth
>> Sent: Tuesday, March 16, 2004 1:12 PM
>> To: Paul Johnson
>> Cc: r-help at r-project.org
>> Subject: Re: [R] glm questions
>>
>>
>> Dear Paul
>>
>> Here are some attempts at your questions.  I hope it's of some help.
>>
>> On Tuesday, Mar 16, 2004, at 06:00 Europe/London, Paul Johnson wrote:
>>
>>> Greetings, everybody. Can I ask some glm questions?
>>>
>>> 1. How do you find out -2*lnL(saturated model)?
>>>
>>> In the output from glm, I find:
>>>
>>> Null deviance:  which I think is  -2[lnL(null) - lnL(saturated)]
>>> Residual deviance:   -2[lnL(fitted) - lnL(saturated)]
>>>
>>> The Null model is the one that includes the constant only
>> (plus offset
>>> if specified). Right?
>>>
>>> I can use the Null and Residual deviance to calculate the
>> "usual model
>>> Chi-squared" statistic
>>> -2[lnL(null) - lnL(fitted)].
>>>
>>> But, just for curiosity's sake, what't the saturated model's -2lnL ?
>>
>> It's important to remember that lnL is defined only up to an additive
>> constant.  For example a Poisson model has lnL contributions -mu +
>> y*log(mu) + constant, and the constant is arbitrary.  The
>> differencing
>> in the deviance calculation eliminates it.  What constant would you
>> like to use??
>>
>
> I have always been und the impression that the constant chosen by glm 
> is
> that which makes the deviance of the saturated model 0, the saturated
> model being the one with one parameter per observation in the dataset.
> ...

But a look at the deviance formula above ---
    -2[lnL(fitted) - lnL(saturated)]
--- shows us that *any* constant can be added to lnL, and the deviance 
for the saturated model will still be zero.

David




More information about the R-help mailing list