EXACT
statistic-options </ computation-options> ;
The EXACT statement requests exact tests and confidence limits for selected statistics. The statistic-options identify which statistics to compute, and the computation-options specify options for computing exact statistics. See the section Exact Statistics for details.
Note: PROC FREQ computes exact tests by using 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 p-values. You can request Monte Carlo estimation by specifying the MC computation-option in the EXACT statement. See the section Computational Resources for more information.
The statistic-options specify which exact tests and confidence limits to compute. Table 3.6 lists the available statistic-options and the exact statistics that are computed. Descriptions of the statistic-options follow the table in alphabetical order.
For one-way tables, exact p-values are available for binomial proportion tests, the chi-square goodness-of-fit test, and the likelihood ratio chi-square test. Exact (Clopper-Pearson) confidence limits are available for the binomial proportion.
For two-way tables, exact p-values are available for the following tests: Pearson chi-square test, likelihood ratio chi-square test, Mantel-Haenszel chi-square test, Fisher’s exact test, Jonckheere-Terpstra test, and Cochran-Armitage test for trend. Exact p-values are also available for tests of the following statistics: Pearson correlation coefficient, Spearman correlation coefficient, Kendall’s tau-b, Stuart’s tau-c, Somers’ , Somers’ , simple kappa coefficient, and weighted kappa coefficient.
For tables, PROC FREQ provides the exact McNemar’s test, exact confidence limits for the odds ratio, and Barnard’s unconditional exact test for the risk (proportion) difference. PROC FREQ also provides exact unconditional confidence limits for the risk 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.
Most of the statistic-option names listed in Table 3.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 statistic-options that are identical to the TABLES statement options CHISQ, MEASURES, and AGREE. For example, when you specify the CHISQ statistic-option in the EXACT statement, PROC FREQ computes exact p-values for the Pearson chi-square, likelihood ratio chi-square, and Mantel-Haenszel chi-square tests for two-way tables. You can request an exact test for an individual statistic by specifying the corresponding statistic-option from the list in Table 3.6.
You must use a TABLES statement with the EXACT statement. 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 statistic-option in the EXACT statement, PROC FREQ automatically invokes the corresponding TABLES statement option. However, when you use an EXACT statement with multiple TABLES statements, you must specify options in the TABLES statements to request statistics. PROC FREQ then provides exact tests or confidence limits for those statistics that you also specify in the EXACT statement.
Table 3.6: EXACT Statement Statistic Options
Statistic Option |
Exact Statistics |
---|---|
McNemar’s test (for tables), simple kappa test, |
|
weighted kappa test |
|
Barnard’s test (for tables) |
|
Binomial proportion tests for one-way tables |
|
Chi-square goodness-of-fit test for one-way tables; |
|
Pearson chi-square, likelihood ratio chi-square, and |
|
Mantel-Haenszel chi-square tests for two-way 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 |
|
Jonckheere-Terpstra test |
|
Test for the simple kappa coefficient |
|
Test for Kendall’s tau-b |
|
Likelihood ratio chi-square test (one-way or two-way tables) |
|
McNemar’s test (for tables) |
|
Tests for the Pearson correlation and Spearman correlation, |
|
confidence limits for the odds ratio (for tables) |
|
Mantel-Haenszel chi-square test |
|
Confidence limits for the odds ratio (for tables) |
|
Pearson chi-square test |
|
Test for the Pearson correlation coefficient |
|
Confidence limits for the relative risk (for tables) |
|
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-c |
|
Cochran-Armitage test for trend |
|
Test for the weighted kappa coefficient |
You can specify the following statistic-options in the EXACT statement.
The computation-options specify options for computing exact statistics. You can specify the following computation-options in the EXACT statement after a slash (/).