stattutorials.com
Statistics Tutorials
for SAS, SPSS, WINKS, Excel


Statistical
Video Training
DVDs

Against All Odds Videos
Against All
Odds VIDEOS

Teaching Videos from Annenberg/PBS.
A video instructional series on statistics for college and high school classrooms.
Special Pricing $20 off!
Click here for Against All Odds info


WINKS Statistical Software
Affordable. Reliable. Relevant.
www.texasoft.com
 


Kwikstat
Data Generator

Generate data sets with continuous, categorical, grouped and correlated data. Great for creating data sets for examples and for quality assurance testing. Data sets are created in standard .CSV format so they can be opened in most statistical programs such as SAS, SPSS, WINKS and into spreadsheet programs such as Microsoft Excel. More info. Order now.

 

SAS Tutorial Menu

Main Tutorial Menu

Numbers

SAS Graph with Error Bars

SAS Graph Error Bars

Example SAS Code

The following code produces the graph above -- which displays means as bars and includes 95% error bars. The data set used for this example is found here and the SAS code is here. Save the date file to the following location: C:\SASDATA\SOMEDATA.SAS7BDAT or change the code to point to the location where you have saved the data file.

Note:

PATTERN1 COLOR=GRAYCC;
AXIS1 LABEL=(F="ARIAL/BOLD" "HOURS")
MINOR=NONE;
AXIS2 LABEL=(F="ARIAL/BOLD" "DEPARTMENT");
TITLE1 'Mean With Error Bars, Version 2';
TITLE2 '(With 95% Confidence Limits)';
PROC GCHART DATA='C:\SASDATA\SOMEDATA';
VBAR GP /
WIDTH=15
TYPE=MEAN
INSIDE=MEAN
ERRORBAR=TOP
CLM=95
SUMVAR=TIME1
RAXIS=AXIS1 MAXIS=AXIS2
COUTLINE=BLACK WOUTLINE=1;
RUN;
QUIT;

Error Bar SAS Graph Code
(right click link to open and save SAS code)