Chapter Contents |
Previous |
Next |
The REG Procedure |
The ADD, DELETE and REWEIGHT statements can be used to modify the current MODEL. Every use of an ADD, DELETE or REWEIGHT statement causes the model label to be modified by attaching an additional number to it. This number is the cumulative total of the number of ADD, DELETE or REWEIGHT statements following the current MODEL statement.
A more detailed explanation of changing the data used to compute the model is given in the section "Reweighting Observations in an Analysis". Extra features for line printer scatter plots are discussed in the section "Line Printer Scatter Plot Features".
The following example illustrates the usefulness of the interactive features. First, the full regression model is fit to the class data (see the "Getting Started" section), and Figure 55.22 is produced.
proc reg data=Class; model Weight=Age Height; run;
Next, the regression model is reduced by the following statements, and Figure 55.23 is produced.
delete age; print; run;
|
Note that the MODEL label has been changed from MODEL1 to MODEL1.1, as the original MODEL has been changed by the delete statement.
The following statements generate a scatter plot of the residuals against the predicted values from the full model. Figure 55.24 is produced, and the scatter plot shows a possible outlier.
add age; plot r.*p. / cframe=ligr; run;
The following statements delete the observation with the largest residual, refit the regression model, and produce a scatter plot of residuals against predicted values for the refitted model. Figure 55.25 shows the new scatter plot.
reweight r.>20; plot / cframe=ligr; run;
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.