I am new to GLM modeling but committed to learning as much as possible...

I have the following situation. Data can fall into one of 4 buckets.

It is a GLM model with a poisson distribution and a log link.

The three models can be described as:

1) A  A+B  A+B+B   A+B+B+B

The design matrix for this would be with lets say one observation for each bucket:

1 0
1 1
1 2
1 3


2) A  A+B  A+B+C   A+B+C+C

1 0 0
1 1 0
1 1 1
1 1 2


3) A  A+B  A+B+C   A+B+C+D   (not realistic. for ex)

1 0 0 0
1 1 0 0
1 1 1 0
1 1 1 1

It may not be obvious, but we are saying we need a new parameter to describe the last two buckets in model 2, and we need two new parameters for 3.

Would these be considered nested models?

How could I compare them to determine which one is best?

Thank you for your help.

  • 4
    $\begingroup$ Sorry I can't understand your models. Formulae such as A+B+B don't make much sense in the usual statistical model-description language as repeated terms would simply be dropped. Nor do I understand how e.g. A A+B A+B+C A+B+C+D can be one single model. $\endgroup$
    – onestop
    Commented Sep 21, 2011 at 13:54

1 Answer 1


Let $X_{i} \in \{1,2,3,4\}$ be which "bucket" you're in and $Y_{i}$ be whatever your dependent variable is. Define $A_{i} = \mathcal{I}\{X_{i} \geq 2\}$, $B_{i} = \mathcal{I}\{X_{i} \geq 3\}$, and $C_{i} = \mathcal{I}\{X_{i} = 4\}$ and $\mathcal{I}\{\cdot\}$ denotes the indicator function. Your description of Model 3 seems to indicate the model

$$ E(Y_{i}|A_{i}, B_i, C_i) = \beta_{0} + \beta_{1} A_{i} + \beta_{2} B_{i} + \beta_{3} C_{i} $$

Model 2 is the special case where $\beta_{2}=\beta_{3}$.

Model 1 is the special case where $\beta_{1}=\beta_{2}=\beta_{3}$.

So, yes, Model 1 is nested within Model 2, which is nested within Model 3. Nested models like this can be compared using the likelihood ratio test if the models are fit by maximum likelihood.


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.