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. You can request Monte Carlo estimation by specifying the MC computationoption in the EXACT statement. 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 (ClopperPearson) 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 McNemar’s exact test and exact confidence limits for the odds ratio. PROC FREQ also provides exact unconditional confidence limits for the risk (proportion) difference and for the relative risk (ratio of proportions). 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 36.6 lists the available statisticoptions and the exact statistics computed. For more information about these statistics, see the TABLES statement and the section Statistical Computations. For more information about exact computations, see the section Exact Statistics.
Most of the option names listed in Table 36.6 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 36.6.
Statistic Option 
Exact Statistics 

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

weighted kappa 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, 

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 

RELRISK 
Confidence limits for the relative risk (for tables) 
RISKDIFF 
Confidence limits for the proportion difference (for tables) 
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 
You can specify options for the following two EXACT statement statisticoptions:
requests exact unconditional confidence limits for the relative risk for tables. PROC FREQ computes the confidence limits by inverting two separate onesided exact tests (Santner and Snell 1980). By default, this computation uses the unstandardized relative risk as the test statistic. If you specify the RELRISK(METHOD=FMSCORE) option, PROC FREQ uses the FarringtonManning score statistic (Chan and Zhang 1999). See the section Exact Unconditional Confidence Limits for the Relative Risk for more information.
You can set the confidence level by using the ALPHA= option in the TABLES statement. The default of ALPHA=0.5 produces 95% confidence limits.
You can specify the following options inside parentheses after the RELRISK statisticoption:
specifies the table column for which to compute the relative risk. The default is COLUMN=1, which provides exact confidence limits for the column 1 relative risk. If you specify COLUMN=BOTH, PROC FREQ provides exact confidence limits for both column 1 and column 2 relative risks.
requests exact unconditional confidence limits that are based on the FarringtonManning score statistic (Chan and Zhang 1999). See the section Exact Unconditional Confidence Limits for the Relative Risk for more information. If you do not specify METHOD=FMSCORE, by default PROC FREQ uses the unstandardized relative risk in the exact confidence limit computations.
requests exact unconditional confidence limits for the risk difference for tables. PROC FREQ computes the confidence limits by inverting two separate onesided exact tests (Santner and Snell 1980). By default, this computation uses the unstandardized risk difference as the test statistic. If you specify the RISKDIFF(METHOD=FMSCORE) option, PROC FREQ uses the FarringtonManning score statistic (Chan and Zhang 1999). See the section Exact Unconditional Confidence Limits for the Risk Difference for more information.
You can set the confidence level by using the ALPHA= option in the TABLES statement. The default of ALPHA=0.5 produces 95% confidence limits.
You can specify the following options inside parentheses after the RISKDIFF statisticoption:
specifies the table column for which to compute the risk difference. The default is COLUMN=BOTH, which provides exact confidence limits for both column 1 and column 2 risk differences.
requests exact unconditional confidence limits that are based on the FarringtonManning score statistic (Chan and Zhang 1999). See the section Exact Unconditional Confidence Limits for the Risk Difference for more information. If you do not specify METHOD=FMSCORE, by default PROC FREQ uses the unstandardized risk difference in the exact confidence limit computations.
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, OR, RELRISK, and RISKDIFF. 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. RELRISK, 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.