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$
5
$\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.

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ +1, excellent answer, clear, to the point, well formatted, etc. $\endgroup$ – gung - Reinstate Monica Oct 19 '17 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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