How do I output predicted values from PROC REG and display them in SAS/GRAPH's PROC GPLOT?
Following the model statement in PROC REG, use an OUTPUT statement with the keyletter P to write the predicted values to a new dataset. This dataset can be subsequently used in PROC GPLOT. For example:
PROC REG ;
MODEL y=x ;
OUTPUT OUT=regout P=yhat ;
PROC GPLOT DATA=regout ;
PLOT yhat*x ;
RUN ;
PROC GPLOT will produce a scatter plot utilizing the default SAS/GRAPH symbol settings. The predicted values YHAT will be plotted against the X values.
For more information on PROC GPLOT, click on the Help button in the SAS menu bar and scroll to SAS Help and Documentation.
If you have further questions, send E-mail to stats@ssc.utexas.edu.