The QTRSELECT Procedure
Classification Variables and the SPLIT Option
PROC QTRSELECT supports the ability to split classification variables when you are doing model selection. You use the SPLIT option in the CLASS statement to specify that the columns of the design matrix that correspond to effects that contain a split classification variable can enter or leave a model independently of the other design columns of that effect. The following statements illustrate the use of the SPLIT option:
data mycas.splitExample;
length c2 $6;
drop i;
do i=1 to 1000;
c1 = 1 + mod(i,6);
if i < 200 then c2 = 'low';
else if i < 500 then c2 = 'medium';
else c2 = 'high';
x1 = ranuni(1);
x2 = ranuni(1);
y = x1+3*(c2 ='low') + 10*(c1=3) +5*(c1=5) + rannor(1);
output;
end;
run;
proc qtrselect data=mycas.splitExample;
class c1(split) c2(order=freq);
model y = c1 c2 x1 x2;
selection method=forward;
run;
The "Class Level Information" table shown in Figure 18.12 is produced by default whenever you specify a CLASS statement.
Figure 18.12: Class Levels
The SPLIT option has been specified for the classification variable c1. This permits the parameters associated with the effect c1 to enter or leave the model individually. The "Parameter Estimates" table in Figure 18.13 shows that for this example the parameters that correspond only to levels 3 and 5 of c1 are in the selected model.
Figure 18.13: Parameter Estimates