Solved – How to evaluate the fit of our GLM model

generalized linear modelgoodness of fitr

Can anyone tell us how to evaluate the fit of our generalized linear model with a poisson distribution? We can't really tell if the model is a good fit or not. Do you use the deviance to answer this question? If so, what does it tell us in the following example?

Generalized linear mixed model fit by maximum likelihood (Laplace
  Approximation) [glmerMod]
 Family: poisson  ( log )
Formula: vok ~ factor(koen) + (1 | group) + factor(obs) + rid + aggr +  
    offset(log(min))
   Data: data

     AIC      BIC   logLik deviance df.resid 
   156.1    172.8    -70.0    140.1       52 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-1.5286 -0.6338 -0.3348  0.5913  4.8183 

Random effects:
 Groups Name        Variance Std.Dev.
 group  (Intercept) 0        0       
Number of obs: 60, groups:  group, 60

Fixed effects:
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)   -5.40345    0.37230 -14.514  < 2e-16 ***
factor(koen)1  1.13549    0.38823   2.925  0.00345 ** 
factor(obs)2   0.84057    0.51918   1.619  0.10544    
factor(obs)3   0.55973    0.24933   2.245  0.02477 *  
factor(obs)4  -1.24449    0.55967  -2.224  0.02617 *  
rid            0.10088    0.01939   5.203 1.96e-07 ***
aggr           0.05890    0.02868   2.053  0.04003 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) fct()1 fct()2 fct()3 fct()4 rid   
factor(kn)1 -0.705                                   
factor(bs)2 -0.275 -0.107                            
factor(bs)3 -0.342 -0.065  0.302                     
factor(bs)4 -0.206  0.005  0.157  0.355              
rid         -0.106 -0.343  0.304  0.304  0.248       
aggr        -0.106 -0.129  0.103 -0.313 -0.241 -0.287

Best Answer

What I like to do in situations like this is plot the actual values against the predicted values. This doesn't give a numeric result, but it gives a good picture of what is going on. Both scatter plots and Tukey mean difference plots can be useful.

You can also see the average difference and quantiles of the difference between actual and predicted values.

Related Question