[R] Pearson residuals in quasi family

MUGGEO VITO vito.muggeo at giustizia.it
Wed Dec 19 10:34:55 CET 2001


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"))

>From summary.glm(obj1) the dispersion parameter is estimated 1.165; In fact
it is:

> (predict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^2
        4        5        6        7        8
 1.165767 1.165767 1.165767 1.165767 1.165767

The standard errors of the fitted values are greater in the quasi-Lik
approach, of course.
Because of this, it's expected that the pearson residuals are smaller in the
quasi-Lik, approach; but

> residuals(obj, type="pearson")[1:5]-residuals(obj1, type="pearson")[1:5]
 4 5 6 7 8
 0 0 0 0 0

That is
resid(obj1, type="pearson")!=resid(obj1, "response")/(predict(obj1,
se.fit=T)$se.fit

Am I wrong or is there any problem?

Thanks for your attention,
best,
vito

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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