Statistical Consulting Center - UMass AMherst
 

Home
Site Licenses
Computer Labs
OITUNIX
Direct Purchase

Statistical Software
Instructional Materials

What's New
Current Releases
Patches


Resources

BCCUMA

Datasets

Workshops

Online Docs
SAS 8.2
SAS 9.1.3
SIR 2002

 

Statistical Software > SAS/WIN Web > Run More Procedures

SAS Online Tutorial

V. Run more Procedures

Now that we have successfully created the SAS dataset called exercise, we would like to get frequencies and bar charts for the categorical variables, jog and tennis. Type or copy/paste the following two procedures into the Editor window:

proc freq data=exercise;
tables jog tennis;
proc gchart data=exercise;
vbar jog tennis/discrete;
run;

The Editor window should look as follows:

The freq procedure is used to get the frequency (counts) of each value found for specified variables. The data= option on any procedure tells SAS which dataset to use for the analysis. The TABLES subcommand specifies which variablesto use in proc freq.

The gchart procedure is used to produce bar charts. The vbar subcommand specifies vertical bars and the variables to use. The discrete option on the vbar subcommand requests that the variable be treated as discrete rather than continuous.

To run the new procedures, first select them in the Editor window and click the running person in the toolbar or select Submit - Run. The output and graph windows should look like this:



Home | Back | Next


© 2004 University of Massachusetts Amherst. Site Policies.