ASSESS Procedure

Getting Started: ASSESS Procedure

(View the complete code for this example.)

Note: Input data must be in a CAS table that is accessible in your CAS session. You must refer to this table by using a two-level name. The first level must be a CAS engine libref, and the second level must be the table name. For more information, see the sections Using CAS Sessions and CAS Engine Librefs and Loading a SAS Data Set onto a CAS Server in Chapter 2, Shared Concepts.

This example demonstrates how to use the ASSESS procedure to compute lift regression information and fit statistics.

The following SAS DATA step creates the SAS data table mylib.score, which is similar to score data from a linear regression, and loads the table into your CAS session:

data mylib.score;
   input _PartInd_ good p_good;
   datalines;
0 0.8224 0.7590
0 0.6538 0.4632
0 0.7693 0.7069
0 0.7491 0.7087
0 0.7779 0.7209
1 0.7161 0.8389
1 0.6779 0.6209
1 0.6392 0.6077
1 0.8090 0.9096
1 0.6064 0.7355
;

These statements assume that your CAS engine libref is named mylib, but you can substitute any appropriately defined CAS engine libref.

In this data table, the variable good is the ground truth and the variable p_good is the prediction from modeling. The variable _PartInd_ assigns each observation to one of two partitions for the analysis.

The following statements call the ASSESS procedure to compute lift regression information and fit statistics.

proc assess data=mylib.score nbins=2;
   var p_good;
   target good;
   by _PartInd_;
run;

The VAR statement specifies that the variable p_good should be analyzed in the model assessment. The TARGET statement specifies that the variable good is the response variable. The BY statement specifies that PROC ASSESS should perform the analysis separately for each value of _PartInd_.

Figure 1 shows the minimum, maximum, and mean of the actual and predicted values for _PartInd_=0.

Figure 1: Lift Regression Information for the First Partition

The ASSESS Procedure

Lift Regression Information
VariableDepthNumber of
Observations
PredictedActual
MinimumMaximumMeanMinimumMaximumMean
p_good00......
 5030.7087000.7590000.7295330.7491000.8224000.783133
 10020.4632000.7069000.5850500.6538000.7693000.711550


Figure 2 shows the error metrics of the interval target for _PartInd_=0.

Figure 2: Fit Statistics for the First Partition

Fit Statistics
Number of
Observations
Squared ErrorAbsolute ErrorSquared Logarithmic ErrorR-Square
Divisor of AverageAverageRoot AverageMeanRoot MeanMeanRoot Mean
550.0098250.0991190.0827600.2876800.0038290.061879-2.15970


Figure 3 shows the minimum, maximum, and mean of the actual and predicted values for _PartInd_=1.

Figure 3: Lift Regression Information for the Second Partition

The ASSESS Procedure

Lift Regression Information
VariableDepthNumber of
Observations
PredictedActual
MinimumMaximumMeanMinimumMaximumMean
p_good00......
 5030.7355000.9096000.8280000.6064000.8090000.710500
 10020.6077000.6209000.6143000.6392000.6779000.658550


Figure 4 shows the error metrics for the interval target for _PartInd_=1.

Figure 4: Fit Statistics for the Second Partition

Fit Statistics
Number of
Observations
Squared ErrorAbsolute ErrorSquared Logarithmic ErrorR-Square
Divisor of AverageAverageRoot AverageMeanRoot MeanMeanRoot Mean
550.0092220.0960290.0882000.2969850.0030500.055230-0.87754


Last updated: June 22, 2026