[R] Pearson residuals in quasi family

Thomas Lumley tlumley at u.washington.edu
Wed Dec 19 17:19:45 CET 2001


On Wed, 19 Dec 2001, MUGGEO VITO wrote:

> Hi all,
> This is a very silly question or something escapes me:
> Let obj a simple gam poisson model. Let
>
> >obj<-gam(....,family=poisson)
> >obj1<-update(obj, family=quasi(link="log", var="mu"))
>
<snip>
> That is
> resid(obj1, type="pearson")!=resid(obj1, "response")/(predict(obj1,
> se.fit=T)$se.fit
>
> Am I wrong or is there any problem?

I don't know about gam() (is this the one in mgcv?) but certainly for
glm() the pearson residuals are the same for quasilikelihood fits.

The Pearson residuals are typically defined as (Y-mu)/sqrt(V(mu))
and the variance function V(mu) doesn't include a scale factor for
quasilikelihood fits since the scale factor doesn't affect the fitting.

If Pearson residuals were rescaled by the estimated dispersion parameter
then for a Gaussian linear model they wouldn't agree with the other
flavours of residual.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list