Example: Analyzing the Sashelp.Baseball Data Set

To create this example:
  1. In the Tasks section, expand the Statistics folder, and then double-click Generalized Linear Models. The user interface for the Generalized Linear Models task opens.
  2. On the Data tab, select the SASHELP.BASEBALL data set.
    Tip
    If the data set is not available from the drop-down list, click Select a table icon. In the Choose a Table window, expand the library that contains the data set that you want to use. Select the data set for the example and click OK. The selected data set should now appear in the drop-down list.
  3. From the Distribution drop-down list, select Poisson.
  4. Assign columns to these roles:
    Role
    Column Name
    Response
    Response variable
    nHome
    From the Link function drop-down list, select Logarithm.
    Explanatory Variables
    Classification variables
    League
    Continuous variables
    logSalary
  5. On the Model tab, click Edit Icon. The Model Effects Builder opens.
  6. In the Variables pane, select League and logSalary.
  7. Click Add to add these as main effects. Click OK to close the Model Effects Builder.
  8. To run the task, click Submit SAS Code.
Here is a subset of the results:
Subset of Results for Example