Example: Predicting a Baseball Player’s Salary
To create this example:
-
In the
Tasks section,
expand the
Statistics folder, and then double-click
Predictive
Regression Models. The user interface for the Predictive
Regression 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.
-
Assign columns to these
roles and specify these options:
Role
|
Column Name
|
Dependent
variable
|
logSalary
|
Classification
variables
|
League
Division
|
Continuous
variables
|
nAtBat
nHits
nHome
nRuns
nRBI
nBB
|
-
On the
Model tab,
click
. The Model Effects Builder opens.
-
Select the
nAtBat,
nHits,
nHome,
nRuns,
nRBI,
nBB.
League,
and
Division variables, and then click
Add.
-
To run the task, click
.
Copyright © SAS Institute Inc. All rights reserved.