Shared Concepts

Model Selection Plots

This section describes the ODS graphical displays that you can request by using the PLOTS= option in the SELECTION statement.

This section applies to the following procedures: GENSELECT, LOGSELECT, PHSELECT, QTRSELECT, and REGSELECT.

The example plots shown in this section are produced by using the REGSELECT procedure.

The following DATA step produces simulated example data that contain a variable that you can use to assign observations to the training, validation, and testing roles. In this case, each role has 5,000 observations. These statements assume that your CAS engine libref is named mycas, as in the section Using CAS Sessions and CAS Engine Librefs, but you can substitute any appropriately defined CAS engine libref.

 data mycas.exampleData;
    drop i j;
    array x{20} x1-x20;
    array c{5}  c1-c5;

    call streaminit(1);

    do i=1 to 15000;
       do j=1 to dim(x);
          x{j} = rand('NORMAL');
       end;

       do j=1 to dim(c);
          c{j} = 1+ int(rand('UNIFORM')*3);
       end;

       y = 1 + x1 + 2*x5 - 1.3*x10 + x20 + 5*(c1=1)+3*(c1=3) - 4*c4 + 25*rand('NORMAL');

            if mod(i,3)=1 then Role = 'TRAIN';
       else if mod(i,3)=2 then Role = 'VAL';
       else                    Role = 'TEST';

       output;
    end;
 run;

The following statements perform forward selection to obtain a parsimonious linear regression model for the response:

ods graphics on;

proc regselect data=mycas.exampleData;
   partition rolevar=Role(train='TRAIN' validate='VAL' test='TEST');
   class c: ;
   model y = x: c:  ;
   selection method=forward(stop=AICC CHOOSE=validate) plots=all;
run;

Because you specified the PLOTS=ALL option in the SELECTION statement and have enabled ODS Graphics, the plots that are described in the following sections are produced.

Last updated: December 21, 2018