Previous Page | Next Page

Choosing the Right Procedure

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 cross-tabulation tables FREQ produces one-way to n-way tables; reports frequency counts; computes chi-square tests; computes computes test and measures of association and agreement for two-way to n-way cross-tabulation tables; can compute exact tests and asymptotic tests; can create output data sets.


TABULATE produces one-way and two-way cross-tabulation 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 graphics*

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.
* To 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. See Quantiles for more information.


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.

Previous Page | Next Page | Top of Page