SGPLOT Procedure

Example 7: Adding Statistical Limits to a Dot Plot

Features:

DOT statement

Sample library member: SGPLDT1
This example shows a dot plot with a response variable and statistical limits. Each dot represents the mean for each value of the category variable, and bands represent the standard deviation.

Output

SGPLDT1 - Adding Statistical Limits to a Dot Plot

Program

proc sgplot data=sashelp.class(where=(age<16));
  dot age / response=height stat=mean
            limitstat=stddev numstd=1;
run;

Program Description

Create the dot plot. The RESPONSE= option specifies the response variable. The STAT= option specifies that the mean statistic is used to analyze the graph. The LIMITSTAT= option specifies that the limit statistic is the standard deviation. The NUMSTD= option specifies that one standard deviation is used.
proc sgplot data=sashelp.class(where=(age<16));
  dot age / response=height stat=mean
            limitstat=stddev numstd=1;
run;