Model Fitting: Generalized Linear Models


Example 1: Fit a Linear Regression Model with Classification Variables

In this example you use the Generalized Linear Models analysis to fit a linear regression model with classification variables and an interaction term. In particular, you model how two variables affect the change in blood pressure in a designed experiment.

The Drug data set contains results of an experiment that is carried out to evaluate the effect of four drugs with three experimentally induced diseases. Each drug-by-disease combination was applied to six randomly selected dogs. The response variable, chang_bp, is the increase in systolic blood pressure due to the treatment. The variables drug and disease are classification variables: their values identify distinct levels or groups.

To fit a generalized linear model:

  1. Open the Drug data set.

    You need to specify that the drug and disease variables are nominal in order to model them as classification variables. The Data Table Menus section in ChapterĀ 4 describes measure levels for variables. The following steps change the measure level of these variables from interval to nominal:

  2. Select the drug and disease variables by holding down the CTRL key while you click the column heading for each variable.

  3. Right-click the column heading for either variable and select Nominal from the pop-up menu, as shown in FigureĀ 24.1.

    Figure 24.1: Changing the Measure Level for Variables

    Changing the Measure Level for Variables


  4. Clear the selected variables by clicking the blank cell in the upper left corner of the data table.