On Wed, 22 Sep 1999 plummer@iarc.fr wrote:
> I have been using quasi-likelihood to analyze some overdispersed lesion
> count data which requires the variance function "mu^2"
(specifically,
> I am using glm with the family quasi(var="mu^2",
link="log")). Some of
> the counts are zero which led to problems fitting the model in R.
>
> 1) glm was unable to find starting values
> 2) after I supplied initial values from the fit of a Poisson
> model, glm could not proceed because the deviance was infinite.
>
> Splus 5.0 had no problems fitting the model. I was able to
> reproduce the Splus results by editing the quasi() family
> generator and using the unnormalized quasi-likelihood
>
> - log(mu) - y/mu (*)
>
> in place of the normalized version
>
> log(y/mu) - (y - mu)/mu (**)
>
> Further investigation of Splus shows how it overcomes these
> two problems
> 1) A fudge factor (in this case 0.167) is added to zero observations
> so that they can be used as starting values.
> 2) The contribution to the deviance is (*) for zero observations
> and (**) for the rest.
>
> I suggest that R also uses this approach for quasi-likelihood
> models.
That is not quite what S-PLUS 5.1 and 2000 have: replace
(*) by
-log(mu) - (y - mu)/mu
That is, the formula is
-log(mu) - (y - mu)/mu + log(y)I(y > 0)
Note that earlier versions of S-PLUS (e.g. 3.4) are plain wrong (and as
I found the bug I know what the replacment is).
Unless there are any objections I will put these fixes in.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._