Chapter Contents

Previous

Next
The FREQ Procedure

EXACT Statement


Requests exact tests or confidence bounds for the specified statistics.

Requirements: TABLES statement
Main discussion: Exact Statistics
Featured in: Analyzing a 2×2 Contingency Table


EXACT statistic-keyword(s)</option(s)>;


Required Arguments

statistic-keyword(s)
specifies the statistics for which to provide exact tests or confidence bounds. PROC FREQ can compute exact p-values for the following hypothesis tests: chi-square goodness-of-fit for one-way tables; Pearson chi-square, likelihood-ratio chi-square, Mantel-Haenszel chi-square, Fisher's exact test, Jonckheere-Terpstra test, Cochran-Armitage test for trend, and McNemar's test for two-way tables. PROC FREQ can also compute exact p-values for tests of hypotheses that the following statistics are equal to zero: Pearson correlation coefficient, Spearman correlation coefficient, simple kappa coefficient, and weighted kappa coefficient. PROC FREQ can compute exact p-values for the binomial proportion test, as well as an exact confidence bound for the binomial proportion. Additionally, PROC FREQ can compute exact confidence bounds for odds ratios for 2×2 tables.

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]

EXACT Statement Statistic-keywords and Required TABLES Statement Options
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

MAXTIME=value
specifies the maximum time (in seconds) that PROC FREQ uses to compute an exact p-value. If the procedure does not complete the computation within the specified time, the computation terminates.
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.