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. Alternatively, when asymptotic methods
may not be sufficient for such large problems, consider using Monte Carlo
estimation of exact p-values. See Exact Statistics for more
information.
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 | 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 for 2×2 tables | AGREE |
MEASURES | tests for the Pearson correlation coefficient and the Spearman correlation and the odds ratio confidence limits for 2×2 tables | ALL, MEASURES |
MHCHI | Mantel-Haenszel chi-square test | ALL, CHISQ |
OR | odds ratio confidence limits for 2×2 tables | ALL, MEASURES, RELRISK |
PCHI | chi-square goodness-of-fit test for one-way tables, Pearson chi-square test for 2×2 tables | 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 |
Default: | 0.01 |
Range: | 0.000<=p<=0.0001 |
Interaction: | ALPHA= invokes the MC option. |
Range: | a positive number |
See also: | Computational Resources |
Featured in: | Computing the Cochran-Armitage Trend Test |
Restriction: | The MC option is available for all statistic keywords except BINOMIAL, MCNEM, and OR. PROC FREQ computes only exact tests or confidence limits for those statistics. |
Tip: | If the procedure does not complete the computation within the specified time, use MAXTIME= to increase the amount of clock time that PROC FREQ uses to compute the exact p-values. |
Interaction: | ALPHA=, N=, and SEED= automatically invoke the MC option. |
Tip: | If the procedure does not complete the computation within the specified time, use MAXTIME= to increase the amount of clock time PROC FREQ can use to compute the Monte Carlo estimates. |
Main Discussion: | Monte Carlo Estimation |
Default: | 10000 |
Range: | a positive integer |
Interaction: | N= invokes the MC option. |
Tip: | Larger values of N= produce more precise estimates of exact p-values. Because larger values of N= generate more samples, the computation time increases. If you need more computation time, use MAXTIME= to increase the clock time. |
Default: | the time of day from the computer's clock |
Range: | a positive integer |
Interaction: | SEED= invokes the MC option. |
Using TABLES Statement Options with the EXACT Statement |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.