1
$\begingroup$

Approach 1:

lm.fit <- glm(response ~ 1, offset=log(lam), family="quasipoisson")
summary(lm.fit)

Approach 2: Feed summary.glm with a pearson dispersion.

lm.fit <- glm(response ~ 1, offset=log(lam), family="poisson")
summary(lm.fit, 
       dispersion=sum(residuals(lm.fit, type="pearson")^2)/df.residual(lm.fit))
$\endgroup$

1 Answer 1

1
$\begingroup$

First of all, they are not both quasipoisson. The first approach is indeed a quasipoisson but the 2nd lm.fit is called a poisson GLM. In approah 1 since you are fitting a quasipoisson, there will be no log-likelihood and therefore there is not any AIC to report in the 1st summary(lm.fit) you wrote.
However, in the 2nd approach since you fitted a poisson GLM first, there will be a log-likelihood and even if you plug in the estimated dispersion effect in the summary, you can still see the AIC criteria in the output of your 2nd summary(lm.fit).
So to sum-up, if by identical you mean the same output in the summaries, then the answer is "No", they are not the same.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.