Exact and Monte Carlo methods are available as shown below. See the indicated procedure documentation for details. In particular, see the EXACT statements in the FREQ, FREQTAB, LOGISTIC, and NPAR1WAY procedures.
Monte Carlo simulation to estimate exact p-values is useful for problems that are so large that exact computations require excessive time and/or memory, but for which asymptotic approximations might not be sufficient.
| Release | Procedure | Exact methods available |
| Before SAS® 9 | FREQ | Fisher's exact test for 2×2 or R×C tables. Exact tests for the Pearson, likelihood ratio, and Mantel-Haenszel chi-square statistics, and the Pearson and Spearman correlation coefficients. Exact Jonckheere-Terpstra, Cochran-Armitage, and McNemar tests. Exact tests and confidence intervals for kappa, weighted kappa, binomial probability, and the odds ratio in 2×2 tables. Monte Carlo estimates of exact p-values |
| MULTTEST | Fisher's exact test; exact permutation versions of Cochran-Armitage trend test and Peto test; see limited exact CMH tests (SAS KB0057151) | |
| NPAR1WAY | Two- or multi-sample exact tests based on Wilcoxon, median, Van der Waerden, and Savage scores. Exact tests for scale (variability) differences. Monte Carlo estimates of exact p-values | |
| PHREG | Exact conditional method for ties in continuous failure times | |
| UNIVARIATE | Sign test; Wilcoxon signed-rank test for N ≤ 20 | |
| LOGISTIC | Exact logistic regression | |
| SAS 9.0 | GLM | Exact multivariate tests (Wilk's lambda, Hotelling-Lawley trace, Roy's greatest root) |
| NPAR1WAY | Exact two-sample Kolmogorov-Smirnov tests | |
| LOGISTIC | Stratified exact conditional logistic regression; Monte Carlo estimation | |
| POWER | Exact power computations for various tests | |
| SAS 9.1 | NPAR1WAY | For two-sample problems, exact one-sided tests for the Kolmogorov-Smirnov D+ and D- statistics |
| FREQ | Exact confidence limits and test for the common odds ratio | |
| SAS 9.2 | FREQ | Unconditional exact confidence limits for the proportion difference; Zelen's exact test for equal odds ratios |
| NPAR1WAY | Exact confidence limits for Hodges-Lehmann estimate of location shift for two-sample data; Exact tests based on Conover scores | |
| POWER | Power for exact equivalence test for binomial proportion | |
| SAS/STAT® 9.22 in SAS 9.2M3 | FREQ | Exact p-values for tests of Kendall's tau-b, Stuart's tau-c, Somers' D(C|R), and Somers' D(R|C) |
| GENMOD | Exact and stratified exact poisson and logistic regression | |
| SAS 9.3 | FREQ | Exact unconditional confidence limits for the relative risk. Additional exact unconditional confidence limits for the risk difference based on the Farrington-Manning score statistic. |
| SAS/STAT 12.1 in SAS 9.3M2 | FREQ | Barnard's exact unconditional test for the risk difference |
| SAS/STAT 13.1 in SAS 9.4M1 | FREQ | Mid p-values for exact tests |
| SAS/STAT 13.2 in SAS 9.4M2 | FREQ | Exact mid-p confidence limits for the binomial proportion |
| SAS/STAT 14.1 in SAS 9.4M3 | FREQ | Exact mid-p confidence limits for the odds ratio |
| LOGISTIC | Added the MCMC exact conditional algorithm, which generates samples from the exact distribution by repeatedly perturbing the response vector to obtain a new response vector while maintaining the sufficient statistics for the nuisance parameters. | |
| SAS/STAT 14.3 in SAS 9.4M5 | FREQ | Exact version of Bowker's symmetry test |
| SAS® Viya® | FREQTAB | Includes all the above exact methods in PROC FREQ. |