![]() Chapter Contents |
![]() Previous |
![]() Next |
| The FREQ Procedure |
| Requirements: | TABLES statement |
| Main discussion: | Exact Statistics |
| Featured in: | Analyzing a 2×2 Contingency Table |
| EXACT statistic-keyword(s)</option(s)>; |
| Required Arguments |
The statistic keywords are identical to options in the TABLES statement and keywords in the OUTPUT statement. You can request exact computations for groups of statistics by using keywords that are identical to the following TABLES statement options: CHISQ, MEASURES, and AGREE. For example, when you specify CHISQ in the EXACT statement, PROC FREQ computes exact p-values for the available CHISQ statistics (Pearson chi-square, likelihood-ratio chi-square, and Mantel-Haenszel chi-square). You request exact p-values for an individual statistic by specifying a keyword shown in EXACT Statement Statistic-keywords and Required TABLES Statement Options .
Note: PROC FREQ computes exact tests
by using fast and efficient algorithms
that are superior to direct enumeration. This technique is appropriate when
a data set is small, sparse, skewed, or heavily tied. For some large problems,
exact computations may require a large amount of time or memory. Consider
using the asymptotic tests for such problems. See Exact Statistics for more
information. ![[cautend]](../common/images/cautend.gif)
| Keyword | Exact statistics computed | Required TABLES statement option |
|---|---|---|
| AGREE | McNemar's test for 2×2 tables and tests for the simple kappa coefficient and the weighted kappa coefficient | AGREE |
| BINOMIAL | binomial proportion test for one-way tables | BINOMIAL |
| CHISQ | 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 | ALL, CHISQ |
| FISHER|
EXACT |
Fisher's exact test | ALL*, CHISQ* |
| JT | Jonckheere-Terpstra test | JT |
| KAPPA | test for the simple kappa coefficient | AGREE |
| LRCHI | likelihood-ratio chi-square test | ALL, CHISQ |
| MCNEM | McNemar's test | AGREE |
| MEASURES | tests for the Pearson correlation coefficient and the Spearman correlation and the odds ratio confidence bounds for 2×2 tables | ALL, MEASURES |
| MHCHI | Mantel-Haenszel chi-square test | ALL, CHISQ |
| OR | odds ratio confidence bounds for 2×2 tables | ALL, MEASURES, RELRISK |
| PCHI | Pearson chi-square test | ALL, CHISQ |
| PCORR | test for the Pearson correlation coefficient | ALL, MEASURES |
| SCORR | test for the Spearman correlation coefficient | ALL, MEASURES |
| TREND | Cochran-Armitage test for trend | TREND |
| WTKAP | test for the weighted kappa coefficient | AGREE |
| *ALL and CHISQ compute Fisher's exact test only for 2×2 tables. | ||
| Options |
| Range: | a positive number |
| See also: | Computational Resources |
| Featured in: | Computing the Cochran-Armitage Trend Test |
| Using TABLES Statement Options with the EXACT Statement |
EXACT Statement Statistic-keywords and Required TABLES Statement Options lists the available statistic keywords and the exact statistics that are computed. If you use only one TABLES statement, you do not need to specify options in the TABLES statement to compute the statistics that the EXACT statement requests. PROC FREQ automatically invokes the corresponding TABLES statement option when you request exact computations. However, when you use multiple TABLES statements, and you want exact computations, you must specify options in the TABLES statement to compute the desired statistics. Then PROC FREQ performs exact computations for all statistics that are also specified in the EXACT statement.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.