SAS introduction, part 6

PROC REG and influence statistics

In PROC GLM it is possible to perform influence statistics, but it is somewhat simpler to use PROC REG, which is good for regression analysis.

The influence statistics mentioned in the book can all be found using the following:

  proc reg data=stat2.sundhed;
    model ilt = maxpuls loebetid / influence r covb;

INFLUENCE and R give the influence statistics, and COVB gives an estimate of the variance-covariance of the parameter estimates.
 

Stepwise regression using PROC REG

SAS has also included options, so that one can perform "All possible regressions", "Backwards elimination", "Forwards selection" and "Stepwise regression" like in the Stat 2 notes section 4.3.

 In PROC REG this is done the following way:

  proc reg data=stat2.sundhed;
    model ilt=alder vegt loebetid hvilpuls loebpuls maxpuls
      </option> ;

Where </option> can be one of the following:

     /SELECTION=RSQUARE mse adjrsq cp aic
    /SELECTION=BACKWARD slstay=0.05
    /SELECTION=FORWARD  slentry=0.05
    /SELECTION=STEPWISE slstay=0.05 slentry=0.05

slentry og slstay are the tail probabilities for F-in og F-out respectively. mse, adjrsq, cp and aic are "mean squared error", "adjusted r-square", "Mallow's Cp" and "Akaike's information criterion". See the SAS-STAT manual for more details.

Plotting influence statistics

Use PROC REG to get visualizations of influence statistics

ods graphics on;
proc reg data=stat2.sundhed plots(label)=(CooksD RStudentByLeverage DFFITS DFBETAS);
id vegt;
model ilt=alder vegt loebetid hvilpuls loebpuls maxpuls;
run;
ods graphics off;

The id vegt sets which label is put on significant/interesting observations in the plots.