0
$\begingroup$

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
$\endgroup$
2
  • 3
    $\begingroup$ This question is not appropriate for this site. It is not specifically about programming. If you need general statistical advice, try Cross Validated instead. Be prepared to define what exactly you mean by "good fit". That's a very subjective term. $\endgroup$
    – MrFlick
    Commented Sep 2, 2014 at 15:00
  • $\begingroup$ There is ample literature pertaining to GOF for GLMs - for example, here's one. You should spend time researching topics like this before asking a question on StackExchange. $\endgroup$
    – nrussell
    Commented Sep 2, 2014 at 15:04

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ Agreed to the general approach, including residual plots (which sometimes benefit from smoothing, to reduce artefacts of discreteness). A suitably defined coefficient of determination can be a useful extra heuristic. See my answer to stats.stackexchange.com/questions/68066/… (the suggestion generalises). $\endgroup$
    – Nick Cox
    Commented Sep 8, 2014 at 10:24
0
$\begingroup$

Your question is probably better suited for the statistics stack exchange (see cross validated), as your question has more to do with the theory and math behind goodness of fit, but I will try to answer it here as best as possible. Check out UCLA's great website link for a review of pseudo R-squared metrics.

To answer your question specifically in R. try using the pscl package and type in ?pR2 to find out more about the function. Without more specific information about your data it's hard to give you further guidance.

$\endgroup$

Your Answer

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