4. In the Diagram Workspace, right-click the Score node, and select Run from the
resulting menu. Click Yes in the Confirmation window that opens.
5. In the window that appears when processing completes, click OK. The scoring code
has been generated, and the scoring data has been scored.
Note: The SAS scoring code is viewable in the node results.
Create a Sorted List of Potential Donors
To use the SAS Code node to create a list of best potential donors:
1. Select the Utility tab on the Toolbar.
2. Select the SAS Code node icon. Drag the node into the Diagram Workspace.
3. Connect the Score node to the SAS Code node.
44 Chapter 7 • Compare Models and Score New Data
4. Select the SAS Code node. In the Properties Panel, scroll down to view the Train
properties, and click on the ellipses that represent the value of Code Editor. The
Training Code — Code Node window appears.
a. In the Training Code box, enter the following SAS code, where <LIBREF> is
the libref of the diagram:
proc sort data= <LIBREF>.Score_SCORE out= bestlist;
by descending ep_target_b;
proc print data= bestlist;
var control_number ep_target_b;
T I P To determine the libref of the diagram, select the diagram in the Project
Panel and then view the diagram ID in the Properties Panel. The diagram ID
is the libref that you should use.
b. On the File menu, select Save All. Then, close the window.
Create a Sorted List of Potential Donors 45
5. In the Diagram Workspace, right-click the SAS Code node, and select Run from the
resulting menu. Click Yes in the Confirmation window that opens. In the Run Status
window, click Results. The Results window appears in which you can view the
scored list of potential donors sorted by expected profit.
6. Close the Results window.
T I P “Predictive Modeling with SAS Enterprise Miner: Practical Solutions for
Business Applications” offers comparisons and combinations of different models, as
well as examples of scoring new data.
46 Chapter 7 • Compare Models and Score New Data