Example: Analyzing the Sashelp.Baseball Data Set
To create this example:
-
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.
-
On the
Data tab,
select the
SASHELP.BASEBALL data set.
Tip
If the data set is
not available from the drop-down list, click
. 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.
-
From the
Distribution drop-down
list, select
Poisson.
-
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
|
-
On the
Model tab,
click
. The
Model Effects Builder opens.
-
In the
Variables pane,
select
League and
logSalary.
-
Click
Add to
add these as main effects. Click
OK to close
the
Model Effects Builder.
-
To run the task, click
.
Copyright © SAS Institute Inc. All rights reserved.