Model Fitting: Generalized Linear Models |
Create the Offset Variable |
As discussed earlier in this example, the quantity is an offset variable for this model. The following steps use the Variable Transformation wizard to create this variable. (This wizard is described in further detail in Chapter 32, Variable Transformations. )
Select Analysis Variable Transformation from the main menu.
The Variable Transformation wizard in Figure 24.14 appears.
The transformation log(Y+a) is highlighted by default. Since this is the desired transformation, you can proceed to the next page of the wizard.
Click Next.
The wizard displays the page shown in Figure 24.15. Note that the transformation appears in the page’s title bar.
Select the months variable, and click Set Y.
Click Finish.
Because there are six observations for which months=0, a warning message appears (Figure 24.16) that informs you that the transformed values for these observations are set to missing values.
Click OK to dismiss the warning message.
The new variable is named Log_months. It contains six missing values. Observations with missing values for the explanatory variables (including the offset variable) or the response variable are not used in fitting the model.
Copyright © SAS Institute, Inc. All Rights Reserved.