6
$\begingroup$

Is there a reason why all the variance weights from a Poisson GLM are equal when a square root link is used? That is (on R):

glm(Y~X1+X2+X3+X4, family=poisson(link=sqrt), data=df)$weights

Always returns equal weights for all observations when a square root link is used; but different weights when the canonical (log) link is used. Does anyone know why?

$\endgroup$
2

1 Answer 1

6
$\begingroup$

The weights in the glm function are

$$ w_i = \left.\frac{(\partial \mu_i/\partial\eta_i)^2}{\text{var}(\mu_i)}\right|_{\mu_i=h(\eta_i) = \eta_i^2} $$

So if $\mu_i = \eta_i^2$ and you recall that $\text{var}(\mu_i)=\mu_i$ then $\partial \mu_i/\partial\eta_i = 2\eta_i$ so $w_i = 4$. This is what you get from glm

> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> glm.D93 <- glm(counts ~ outcome + treatment, family = poisson(link = "sqrt"))
> 
> glm.D93$weights
1 2 3 4 5 6 7 8 9 
4 4 4 4 4 4 4 4 4   

On the other hand, the log-link function has $\partial \mu_i/\partial\eta_i = \exp(\eta_i)$ and thus you get different weights.

$\endgroup$
1
  • 2
    $\begingroup$ +1, excellent answer, clear, to the point, well formatted, etc. $\endgroup$ Commented Oct 19, 2017 at 23:55

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.