Model Fitting: Generalized Linear Models

Example 2: Poisson Regression

In this example, you examine another example of a generalized linear model: Poisson regression. A Poisson regression analysis might be appropriate when the response variable represents counts or rates. If your explanatory variables are all nominal (that is, you can write a contingency table containing the data), then the Poisson model is often called a log-linear model.

Counts are always nonnegative, whereas a linear model can predict negative values for the response. Consequently, it is common to choose a logarithmic link function for the response. That is, if the response variable is y and the expected value of y is \mu, a Poisson regression finds parameters that best fit the data to the model \log(\mu) = {x}{{{\beta}}}.

Sometimes the counts represent the number of events that occurred during an observed time period. Some counts might correspond to longer time periods than others do. In this situation, you want to model the rate at which the events occur. When you model a rate, you are modeling the number of events, y, per unit of time, t. The expected value of the rate is \mu/t, where \mu is the expected value of y. In this case, the Poisson model is \log(\mu/t) = {x}{{{\beta}}}. By using the fact that \log(\mu/t) = \log(\mu) - \log(t), this equation can be rewritten as

\log(\mu) = \log(t) + {x}{{{\beta}}}
The term \log(t) is called an offset variable.

The example in this section fits a Poisson model to data in the Ship data set. The data and analysis are from McCullagh and Nelder (1989). The response variable, Y, is the number of damage incidents that occurred during the number of months that ship was in service (contained in the months variable). As discussed in the previous paragraph, the quantity \log({\hv months}) is an offset variable for this model. The three classification variables are as follows:


Exploring the Data

Creating the Offset Variable

Modeling the Data

Modeling Overdispersion

Previous Page | Next Page | Top of Page