2
$\begingroup$

I have a Poisson regression where I regress a counts variable (called $H(x)$) on one covariate (called $x$) and one factor (categorical) variable (called $s$), which can take one of three values recoded to integers 1 through 3. I am including an offset variable called $P(x)$ and an intercept called $B_0$. I am trying to write the regression equation.

I believe I have correctly expressed the dependent, offset, intercept, and $B_1$ terms, but am not sure about how to express the categorical variable (the $s$) term. Since it's a categorical variable that takes an integer value in the range 1 through 3, I would like to know if can I write it like this (in bold below):

$$\log H(x) = \log P(x) + B0 + B1 \cdot x + B2\cdot s$$

or if instead I should express each possible value in the equation (since the regression results give one beta parameter estimate for each of the three values) like this:

$$\log H(x) = \log P(x) + B0 + B1 \cdot x + B2 \cdot 1 + B3 \cdot 2 + B4 \cdot 3$$

The value for this categorical factor coded as "3" is the reference variable and so the parameter estimate is set by the regression procedure in SPSS to 0.

$\endgroup$

1 Answer 1

7
$\begingroup$

The Poisson regression model is

$$ \begin{align} \mathbb{E}(Y_i \mid \boldsymbol{X}_i) &\equiv h(\boldsymbol{X}_i) \\ &= \exp(\beta_0 + \sum_{k=1}^K\beta_k X_{ki}) \\ &= \mathbb{V}(Y_i \mid \boldsymbol{X}_i) \end{align} $$ Note in particular the restriction of the Poisson regresion model that the conditional variance is identical to the conditional mean.

There is however, nothing specific to the Poisson regression equation in your question. Any time that you include a factor variable as a regressor, and ask for it to be included as a factor variable, the regressor is broken up into binary variables, one less than the number of total categories of the factor variable.

So in your example,

$$ \log h(\boldsymbol{X}_i) = \underbrace{\beta_0}_{\text{Intercept}} + \underbrace{\log X_{1i}}_{\text{Offset}} + \beta_2X_{2i} + \underbrace{\sum_{c=1}^{C-1}\beta_{3c}\mathbf{1}_{[X_{3i}==c]}}_{\text{Sum across levels of factor variable}} $$

$\endgroup$
5
  • $\begingroup$ Great, now I understand the form for the factor variable. Now, do the subscripts for the x covariate in the offset and B2 terms indicate these are two different variables? In my model, the x in P(x) is the same value as the x in the B2 term (as you've expressed it). $\endgroup$
    – rama
    Commented May 28, 2014 at 15:39
  • $\begingroup$ @rama While there is no problem with that, and what I have written is more general, the model should make substantive sense -- that the offset variable is also a regressor of the model. $\endgroup$ Commented May 28, 2014 at 15:54
  • $\begingroup$ Right, but this is where it gets confusing to me: if the offset is a model regressor, why is there no beta parameter estimate for it? $\endgroup$
    – rama
    Commented May 28, 2014 at 15:59
  • 1
    $\begingroup$ @rama That is the point of offset terms. There are a number of motivations for how they come about, and you might want to read about them here and here. $\endgroup$ Commented May 28, 2014 at 16:16
  • $\begingroup$ rama - for offsets the coefficient is fixed at 1 - that's what offsets are designed to do. $\endgroup$
    – Glen_b
    Commented May 28, 2014 at 23:57

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.