[R] mu^2(1-mu)^2 variance function for GLM

Henric Nilsson henric.nilsson at statisticon.se
Wed Jun 22 12:11:43 CEST 2005


Dear Professor Firth,

David Firth said the following on 2005-06-16 17:22:

> I do not have a ready stock of other examples, but I do have my own 
> version of a family function for this, reproduced below.  It differs 
> from yours (apart from being a regular family function rather than using 
> a modified "quasi") in the definition of deviance residuals.  These 
> necessarily involve an arbitrary constant (see McCullagh and Nelder, 
> 1989, p330); in my function that arbitrariness is in the choice eps <- 
> 0.0005.  I don't think the deviance contributions as you specified in 
> your code below will have the right derivative (with respect to mu) for 
> observations where y=0 or y=1.

I'm sorry for the late reply.

You're right -- my definition of the deviance residuals isn't correct. 
Your code, on the other hand, seems to do the right thing.

Many thanks for this note and the provided `wedderburn' function.


Henric




More information about the R-help mailing list