I am trying to fit a negative binomial GLM to fish catch data with month of the year (factor) as my explanatory variable. I have selected the month with the greatest number of catches as my reference level and fitted the model using the glm.nb() function from the MASS package.


Using anova(model1) shows that the factor month is significant and my pseudo $R^2$ is about 55%. The problem I have is that months with no catches at all have p-values greater than 0.05 (close to 1), even though I would expect them to be significantly lower than the reference level. Months with only very few catches are significant on the other hand. The output from the predict() function makes sense, so I think the model should be fine. Is there a problem with the likelihood test R uses, or am I fitting the wrong model to my data? From other posts I figured that I might have to use a likelihood ratio rather than Wald's test; any suggestions on how to do that in R? Any help would be greatly appreciated. See model output below, the months with 0 catches are May and June:

glm.nb(formula = NumCaught ~ factor(month) + offset(log(Effort_mins * 
Nhooks)), data = f[f$Area == "PW", ], init.theta = 1.181267049, 
link = log)

Deviance Residuals: 
Min       1Q   Median       3Q      Max  
-1.8445  -0.7766  -0.2148   0.0000   1.5386  

                     Estimate Std. Error z value Pr(>|z|)    
(Intercept)            -2.647e+00  3.192e-01  -8.292  < 2e-16 ***
factor(month)May       -2.754e+01  1.024e+05   0.000 0.999785    
factor(month)June      -2.790e+01  3.122e+05   0.000 0.999929    
factor(month)September -2.516e+00  6.516e-01  -3.861 0.000113 ***
factor(month)December  -1.112e-01  4.403e-01  -0.253 0.800543    
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

(Dispersion parameter for Negative Binomial(1.1813) family taken to be 1)

Null deviance: 80.420  on 45  degrees of freedom
Residual deviance: 36.178  on 41  degrees of freedom
AIC: 140.81

Number of Fisher Scoring iterations: 1

          Theta:  1.181 
      Std. Err.:  0.525 

2 x log-likelihood:  -128.815 
  • $\begingroup$ What is the reason for the offset()? Also the log of two things multiplied is going to be the logs of each, added. Is that what you wanted? $\endgroup$
    – Peter Flom
    Feb 6 '14 at 1:00
  • $\begingroup$ The offset is to account for differences in fishing effort for each sample (number of hooks used and the duration of the gear deployment) $\endgroup$
    – Kilian
    Feb 6 '14 at 1:32
  • $\begingroup$ Interesting. Can you share the data? $\endgroup$
    – Peter Flom
    Feb 6 '14 at 1:37
  • $\begingroup$ @Peter Flom. No unfortunately not and I don't think a subset would be of any use in this case. $\endgroup$
    – Kilian
    Feb 6 '14 at 1:39
  • $\begingroup$ I would look at the relationship between the offset and the number caught, and make sure the offset is doing the right thing. $\endgroup$
    – Peter Flom
    Feb 6 '14 at 1:40

This is happening because your May and June dummy variables perfectly predict outcomes of zero. The "true" MLEs for May and June would be negative infinity, but the log-likelihood increases at a slower and slower rate and eventually the optimizer gives up. Since the log-likelihood is almost flat at the supposed MLE, the standard errors are estimated to be huge when they are really meaningless. It is the equivalent of a separation problem in logistic regression.


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.