Skip to content
Prev 257683 / 398502 Next

GLM output for deviance and loglikelihood

On Apr 21, 2011, at 11:30 , Jeffrey Pollock wrote:

            
Yes. (I did say "pretty much"...). There are also some synthetic cases like when you enter a 2x2 table as 4 separate records:
Call:
glm(formula = outcome ~ g, family = binomial, data = d, weights = n)

Deviance Residuals: 
     1       2       3       4  
-1.482   1.274  -2.255   2.116  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)   1.0986     2.5658   0.428    0.669
g            -0.4055     1.4434  -0.281    0.779

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 13.460  on 3  degrees of freedom
Residual deviance: 13.380  on 2  degrees of freedom
AIC: 17.380

Number of Fisher Scoring iterations: 3

(The results are fine as long as you don't actually use the "residual deviance" for anything!)