The FREQ Procedure 
EXACT Statement 
Note:PROC FREQ computes exact tests with fast and efficient algorithms that are superior to direct enumeration. Exact tests are appropriate when a data set is small, sparse, skewed, or heavily tied. For some large problems, computation of exact tests might require a considerable amount of time and memory. Consider using asymptotic tests for such problems. Alternatively, when asymptotic methods might not be sufficient for such large problems, consider using Monte Carlo estimation of exact pvalues. See the section Computational Resources for more information.
The statisticoptions specify the statistics to provide exact tests or confidence limits for.
For oneway tables, exact pvalues are available for the binomial proportion tests and the chisquare goodnessoffit test. Exact confidence limits are available for the binomial proportion.
For twoway tables, exact pvalues are available for the following tests: Pearson chisquare test, likelihoodratio chisquare test, MantelHaenszel chisquare test, Fisher’s exact test, JonckheereTerpstra test, and CochranArmitage test for trend. Exact pvalues are also available for tests of the following statistics: Pearson correlation coefficient, Spearman correlation coefficient, Kendall’s tau, Stuart’s tau, Somers’ , Somers’ , simple kappa coefficient, and weighted kappa coefficient.
For tables, PROC FREQ provides exact confidence limits for the odds ratio, exact unconditional confidence limits for the proportion difference, and McNemar’s exact test. For stratified tables, PROC FREQ provides Zelen’s exact test for equal odds ratios, exact confidence limits for the common odds ratio, and an exact test for the common odds ratio.
Table 3.6 lists the available statisticoptions and the exact statistics computed. Most of the option names are identical to the corresponding option names in the TABLES and OUTPUT statements. You can request exact computations for groups of statistics by using options that are identical to the following TABLES statement options: CHISQ, MEASURES, and AGREE. For example, when you specify the CHISQ option in the EXACT statement, PROC FREQ computes exact pvalues for the Pearson chisquare, likelihoodratio chisquare, and MantelHaenszel chisquare tests. You can request exact computations for an individual statistic by specifying the corresponding statisticoption from the list in Table 3.6.
StatisticOption 
Exact Statistics Computed 

McNemar’s test (for tables), simple kappa coefficient test, 

weighted kappa coefficient test 

Binomial proportion tests for oneway tables 

Chisquare goodnessoffit test for oneway tables; 

Pearson chisquare, likelihoodratio chisquare, and 

MantelHaenszel chisquare tests for twoway tables 

Confidence limits for the common odds ratio and 

common odds ratio test (for tables) 

Zelen’s test for equal odds ratios (for tables) 

Fisher’s exact test 

JonckheereTerpstra test 

Test for the simple kappa coefficient 

Test for Kendall’s tau 

Likelihoodratio chisquare test 

McNemar’s test (for tables) 

Tests for the Pearson correlation and Spearman correlation, 

confidence limits for the odds ratio (for tables) 

MantelHaenszel chisquare test 

Confidence limits for the odds ratio (for tables) 

Pearson chisquare test 

Test for the Pearson correlation coefficient 

Confidence limits for the proportion differences (for tables) 

Confidence limits for the column 1 proportion difference 

Confidence limits for the column 2 proportion difference 

Test for the Spearman correlation coefficient 

Test for Somers’ 

Test for Somers’ 

Test for Stuart’s tau 

CochranArmitage test for trend 

Test for the weighted kappa coefficient 
If you use only one TABLES statement, you do not need to specify the same options in both the TABLES and EXACT statements; when you specify a statisticoption in the EXACT statement, PROC FREQ automatically invokes the corresponding TABLES statement option. However, when you use multiple TABLES statements and want exact computations, you must specify options in the TABLES statements to request the desired statistics. PROC FREQ then performs exact computations for all statistics that you also specify in the EXACT statement.
The TABLES statement group option CHISQ includes tests that correspond to the following EXACT statement individual statisticoptions: LRCHI, MHCHI, and PCHI. The MEASURES option in the TABLES statement includes statistics that correspond to the following EXACT statement statisticoptions: KENTB, OR, PCORR, SCORR, SMDCR, SMDRC, and STUTC. The AGREE option in the TABLES statement produces analyses that correspond to the KAPPA, MCNEM, and WTKAP statisticoptions in the EXACT statement. The CMH option in the TABLES statement produces analyses that correspond to the COMOR and EQOR (ZELEN) statisticoptions in the EXACT statement.
The computationoptions specify options for computation of exact statistics. You can specify the following computationoptions in the EXACT statement after a slash (/).
specifies the level of the confidence limits for Monte Carlo pvalue estimates. The value of must be between 0 and 1, and the default is 0.01. A confidence level of produces % confidence limits. The default of ALPHA=.01 produces 99% confidence limits for the Monte Carlo estimates.
The ALPHA= option invokes the MC option.
specifies the maximum clock time (in seconds) that PROC FREQ can use to compute an exact pvalue. If the procedure does not complete the computation within the specified time, the computation terminates. The value of MAXTIME= must be a positive number. The MAXTIME= option is valid for Monte Carlo estimation of exact pvalues, as well as for direct exact pvalue computation. See the section Computational Resources for more information.
requests Monte Carlo estimation of exact pvalues instead of direct exact pvalue computation. Monte Carlo estimation can be useful for large problems that require a considerable amount of time and memory for exact computations but for which asymptotic approximations might not be sufficient. See the section Monte Carlo Estimation for more information.
The MC option is available for all EXACT statisticoptions except the BINOMIAL option and the following options that apply only to or tables: COMOR, EQOR, MCNEM, RISKDIFF, and OR. PROC FREQ computes only exact tests or confidence limits for these statistics.
The ALPHA=, N=, and SEED= options also invoke the MC option.
specifies the number of samples for Monte Carlo estimation. The value of n must be a positive integer, and the default is 10,000. Larger values of n produce more precise estimates of exact pvalues. Because larger values of n generate more samples, the computation time increases.
The N= option invokes the MC option.
requests exact point probabilities for the test statistics.
The POINT option is available for all the EXACT statement statisticoptions except the OR and RISKDIFF options, which provide exact confidence limits. The POINT option is not available with the MC option.
specifies the initial seed for random number generation for Monte Carlo estimation. The value of the SEED= option must be an integer. If you do not specify the SEED= option or if the SEED= value is negative or zero, PROC FREQ uses the time of day from the computer’s clock to obtain the initial seed.
The SEED= option invokes the MC option.
Copyright © SAS Institute, Inc. All Rights Reserved.