Procedure features: |
HBAR statement options:
|
CLM= |
|
ERRORBAR= |
|
FREQLABEL= |
|
MEANLABEL= |
|
NOFRAME |
|
SUMVAR= |
|
TYPE= | |
|
Other features: |
GOPTIONS statement option:
|
AXIS statement |
|
Sample library member: |
GCHERRBR
|
This
example uses the FITNESS data set to chart the
mean heart rate for each age group with error bars showing the confidence
limits for the average. The response axis label describes the confidence limit
for the error bars. To make the error bars easier to read, the program suppresses
the frame that the procedure draws around the axis area. Descriptive column
head labels in the table of statistics replace the statistic names that appear
by default.
|
goptions reset=all border; |
|
data fitness;
input age sex $ heart exer aero;
datalines;
28 M 86 2 36.6
41 M 76 3 26.7
30 M 78 2 33.8
29 M 54 3 44.8
48 F 66 2 28.9
36 F 66 2 33.2
; |
|
title1 "Average Resting Heart Rate by Age";
footnote j=r "GCHERRBR"; |
|
axis1 label=("Heart Rate" j=c "Error Bar Confidence Limits: 95%")
minor=(number=1);
axis2 label=("Age" j=r "Group"); |
|
proc gchart data=fitness;
hbar age / type=mean
sumvar=heart
freqlabel="Number in Group"
meanlabel="Mean Heart Rate"
errorbar=bars
clm=95
midpoints=(30 40 50)
raxis=axis1
maxis=axis2
noframe;
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.