SGPLOT Procedure

Example 4: Adding Prediction and Confidence Bands to a Regression Plot

Features:

REG statement

Sample library member: SGPLREG
This example shows a regression plot with prediction and confidence limits.

Output

SGPLREG - Adding Prediction and Confidence Bands to a Regression Plot

Program

proc sgplot data=sashelp.class;
  reg x=height y=weight / CLM CLI;
run;

Program Description

Create the regression plot. The CLM option adds confidence limits for the mean predicted values. The CLI option adds confidence limits for the individual predicted values.
proc sgplot data=sashelp.class;
  reg x=height y=weight / CLM CLI;
run;