Statistical Procedures

Available Statistical Procedures

The following table lists statistical procedures according to task. The Most Common Simple Statistics lists the most common statistics and the procedures that compute them.
Elementary Statistical Procedures by Task
Report type
Procedure
Description
Descriptive statistics
CORR
Computes simple descriptive statistics.
MEANS or SUMMARY
Computes descriptive statistics; can produce printed output and output data sets. By default, PROC MEANS produces printed output, and PROC SUMMARY creates an output data set.
REPORT
Computes most of the same statistics as PROC TABULATE; allows customization of format.
SQL
Computes descriptive statistics for data in one or more DBMS tables; can produce a printed report or create a SAS data set.
TABULATE
Produces tabular reports for descriptive statistics; can create an output data set.
UNIVARIATE
Computes the broadest set of descriptive statistics; can create an output data set.
Frequency and crosstabulation tables
FREQ
Produces one-way to n-way tables; reports frequency counts; computes chi-square tests; computes test and measures of association and agreement for two-way to n-way crosstabulation tables; can compute exact tests and asymptotic tests; can create output data sets.
TABULATE
Produces one-way and two-way crosstabulation tables; can create an output data set.
UNIVARIATE
Produces one-way frequency tables.
Correlation analysis
CORR
Computes Pearson's, Spearman's, and Kendall's correlations and partial correlations; also computes Hoeffding's measures of dependence (D) and Cronbach's coefficient alpha.
Distribution analysis
UNIVARIATE
Computes tests for location and tests for normality.
FREQ
Computes a test for the binomial proportion for one-way tables; computes a goodness-of-fit test for one-way tables; computes a chi-square test of equal distribution for two-way tables.
Robust estimation
UNIVARIATE
Computes robust estimates of scale, trimmed means, and Winsorized means.
Data transformation
Computing ranks
RANK
Computes ranks for one or more numeric variables across the observations of a SAS data set and creates an output data set; can produce normal scores or other rank scores.
Standardizing data
STANDARD
Creates an output data set that contains variables that are standardized to a given mean and standard deviation.
Low-resolution graphics1
CHART
Produces a graphical report that can show one of the following statistics for the chart variable: frequency counts, percentages, cumulative frequencies, cumulative percentages, totals, or averages.
UNIVARIATE
Produces descriptive plots such as stem-and-leaf plot, box plots, and normal probability plots.
1To produce high-resolution graphical reports, use SAS/GRAPH software.

Efficiency Issues

Quantiles

For a large sample size n, the calculation of quantiles, including the median, requires computing time proportional to nlog(n). Therefore, a procedure, such as UNIVARIATE, that automatically calculates quantiles might require more time than other data summarization procedures. Furthermore, because data is held in memory, the procedure also requires more storage space to perform the computations. By default, the report procedures PROC MEANS, PROC SUMMARY, and PROC TABULATE require less memory because they do not automatically compute quantiles. These procedures also provide an option to use a new fixed-memory, quantiles estimation method that is usually less memory-intense. For more information, see Quantiles in the PROC MEANS documentation.

Computing Statistics for Groups of Observations

To compute statistics for several groups of observations, you can use any of the previous procedures with a BY statement to specify BY-group variables. However, BY-group processing requires that you previously sort or index the data set, which for very large data sets might require substantial computer resources. A more efficient way to compute statistics within groups without sorting is to use a CLASS statement with one of the following procedures: MEANS, SUMMARY, or TABULATE.

Additional Information about the Statistical Procedures

SAS Elementary Statistics Procedures lists standard keywords, statistical notation, and formulas for the statistics that Base SAS procedures compute frequently. The sections on the individual statistical procedures discuss the statistical concepts that are useful to interpret a procedure output.