1

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), 
                family=poission(link="log"))
    fit4 <- glm(egg.count ~ b.depth + s.depth + temp.20m + 
               lat + lon + flow + temp.surf + net.area, 
               family=poission(link="log"))

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.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
user60887
  • 193
  • 2
  • 11
  • 1
    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. – FisherDisinformation May 10 '16 at 17:53
  • See also https://stats.stackexchange.com/questions/509957/nested-glm-models/510243#510243 – kjetil b halvorsen Feb 20 '21 at 00:18

1 Answers1

4

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.

Slow loris
  • 1,045
  • 6
  • 26