Descriptive Statistics in SAS

Overview

Descriptive statistics allow you to get a sense of how interval or ratio data is organized. Through measurses such as mean, variance skewness, and others you can quickly get a basic understanding of a particular variable. SAS provides two procedures to assist in this proc univariate and proc means. Each is described below.

Procedure Means

Proc means will produce a short listing for each variable specified with some basic statistics such as: total observations, number of non-missing observations, minimum, maximum, mean, and standard deviation.

The basic format of this procedure is:

proc means data=dataset;
var variable-list;
run;

If you do not specify a list of variables then all possible variables will be summarized.

Example 4. Using Proc Means

Procedure Univariate

Proc univariate will generate a page with assorted statistics for each variable specified.

The statistics generated by proc univariate fall into three categories, moments which provide statistics such as mean, variance, etc.; quantiles which show the distribution of the values; and extremes which highlight the highest and lowest observed values. The extremes output is very helpful in identifying errors in your data for interval or ratio variables.

Proc univariate could produce a frequency table if directed to by specifying the freq keyword in the procedure declaration (see generating frequencies). Proc univariate will not analzye variables defined to be of type character in the input keyword and is limited to numeric values only.

The following code show the basic setup:

proc freq data=dataset ;
var variable-list;
run;

Example 5 - Using Proc Univariate


Back to Sas Index Page

Author - Jack Suess
UMBC University Computing Services
Created - 1/15/96