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 factit is:> (predict(obj1, se.fit=T)$se.fit[1:5]/predict(obj, se.fit=T)$se.fit[1:5])^24 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Possibly Parallel Threads
- variance specification using glm and quasi
- Error in glm(..., family=quasi(..., variance=list(...)))
- add1() and glm
- Function for ddply
- different results across versions for glmer/lmer with the quasi-poisson or quasi-binomial families: the lattest version might not be accurate...