Hi,
I'm using S-PLUS Professional Edition Version 6.1.2 Release 1 for
Windows to build a quasi-likelihood glm with a log link and variance
proportional to the mean. I've been using the "glm" command to build a
null model, which I then feed to "step.glm" to test a range of variables
for inclusion in the model. My code is as follows:
####
null.indglm.stripe10 <- glm(formula = indstripe ~offset(log(oneffort20)),
family = quasi(link = log, variance = "mu"), data = all.10.ind13)
indglm1.stripe10 <- step.glm(null.indglm.stripe10, direction="both", scope=~
frontsd2
+ distarc + distarc2
+ depth + depth2
+ pslope + pslope2
+ temp + temp2
+ sal + sal2
+ tcd + tcd2
+ tcs + tcs2
+ ezd + ezd2
+ log(chcon) + (log(chcon))2
+ beauf + beauf2,
keep=keepit)
####
I would like to look at the percent change in deviance between the null
model and the model that step.glm selects. To do this, I used the
"summary" command on indglm1.stripe10. The value returned for the null
deviance is LESS than that for the residual deviance:
###
Null Deviance: 238718.1 on 14522 degrees of freedom
Residual Deviance: 258702.1 on 14508 degrees of freedom
###
Then I called for a summary of the null model (null.indglm.stripe10) and
a much larger value was returned for the null deviance:
###
Null Deviance: 278765.6 on 14522 degrees of freedom
Residual Deviance: 278765.6 on 14522 degrees of freedom
###
It looks like step.glm is using the larger value for the null deviance
in computing AIC (I see this when I get the printout from
indglm1.stripe10$anova). Why is the estimated value of the null
deviance different between the summary of the null model and the summary
of the best model from step.glm? Does this have to do with my
specification of the quasi-likelihood family? Is the second value of
the null deviance derived from a revised estimate of the scale
(dispersion) parameter? When does the estimated value of the null
deviance change in the step.glm algorithm?
Thanks for your time.
Megan
|