Using the STORE Statement

The preceding section shows how you can use macro variables to facilitate performing postselection analysis by using other SAS procedures. An alternative approach is to use the STORE statement to save the results of the PROC GLMSELECT step in an item store. You can then use the PLM procedure to obtain a rich set of postselection analyses. The following statements show how you can use this approach to obtain the same LSMeans analyses as shown in section Macro Variables Containing Selected Models:

 
proc glmselect data=one;
  by     byVar;
  class  classVar;
  model  y = classVar x1|x2|x3|x4|x5 @2 /
                 selection=stepwise(stop=aicc);
  store out=glmselectStore;
run; 

proc plm source=glmselectStore;
   lsmeans classVar;
   run;
run;

The LSMeans analysis output for the first BY group is shown in Figure 44.15.

Figure 44.15 LS-Means Analysis Produced by PROC PLM
The PLM Procedure

classVar Least Squares Means
classVar Estimate Standard Error DF t Value Pr > |t|
1 7.8832 0.1050 393 75.11 <.0001
2 10.9529 0.1043 393 104.99 <.0001
3 13.9412 0.1043 393 133.70 <.0001
4 16.7929 0.1042 393 161.09 <.0001