I am not able to tell if these two glm models are nested within one another. This is from the "mack" dataset in the R library "gamair".

    fit3 <- glm(egg.count ~ b.depth + s.depth + temp.20m + 
                lat + lon + flow + temp.surf + factor(country), 
    fit4 <- glm(egg.count ~ b.depth + s.depth + temp.20m + 
               lat + lon + flow + temp.surf + net.area, 

I said that these two models were not nested because net.area is in one model and not in the other and the same for country. Hence there is no larger model. But I'm still not sure if this correct reasoning.

  • 1
    $\begingroup$ What you could do is compare them via an intermediate, larger model (like a saturated one), or through other goodness of fit assessment measures (like an ROC curve, but this is more for binomial models). About that last thing, since you are fitting counts, you know that there is a logistic model which corresponds to yours, so you could use that. $\endgroup$ Commented May 10, 2016 at 17:53
  • $\begingroup$ See also stats.stackexchange.com/questions/509957/nested-glm-models/… $\endgroup$ Commented Feb 20, 2021 at 0:18

1 Answer 1


The models are not nested, as you correctly reasoned. For a model A to be nested in model B, you have to be able to get to A from B by removing parameters from B.


Your Answer

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

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