29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

144 Chapter 2. The FREQ Procedure<br />

upper bound for the longest path and a lower bound for the shortest path, following<br />

the approach of Valz and Thompson (1994).<br />

The longest and shortest path distances or bounds for a node are compared to the<br />

value of the test statistic to determine whether all paths through the node contribute<br />

to the p-value, none of the paths through the node contribute to the p-value, or neither<br />

of these situations occur. If all paths through the node contribute, the p-value is incremented<br />

accordingly, and these paths are eliminated from further analysis. If no paths<br />

contribute, these paths are eliminated from the analysis. Otherwise, the algorithm<br />

continues, still processing this node and the associated paths. The algorithm finishes<br />

when all nodes have been accounted for, incrementing the p-value accordingly, or<br />

eliminated.<br />

In applying the network algorithm, PROC FREQ uses full precision to represent all<br />

statistics, row and column scores, and other quantities involved in the computations.<br />

Although it is possible to use rounding to improve the speed and memory requirements<br />

of the algorithm, PROC FREQ does not do this since it can result in reduced<br />

accuracy of the p-values.<br />

For one-way tables, PROC FREQ computes the exact chi-square goodness-of-fit test<br />

by the method of Radlow and Alf (1975). PROC FREQ generates all possible oneway<br />

tables with the observed total sample size and number of categories. For each<br />

possible table, PROC FREQ compares its chi-square value with the value for the observed<br />

table. If the table’s chi-square value is greater than or equal to the observed<br />

chi-square, PROC FREQ increments the exact p-value by the probability of that table,<br />

which is calculated under the null hypothesis using the multinomial frequency<br />

distribution. By default, the null hypothesis states that all categories have equal proportions.<br />

If you specify null hypothesis proportions or frequencies using the TESTP=<br />

or TESTF= option in the TABLES statement, then PROC FREQ calculates the exact<br />

chi-square test based on that null hypothesis.<br />

For binomial proportions in one-way tables, PROC FREQ computes exact confidence<br />

limits using the F distribution method given in Collett (1991) and also described by<br />

Leemis and Trivedi (1996). PROC FREQ computes the exact test for a binomial<br />

proportion (H 0 : p = p 0 ) by summing binomial probabilities over all alternatives. See<br />

the section “Binomial Proportion” on page 118 for details. By default, PROC FREQ<br />

uses p 0 = 0.5 as the null hypothesis proportion. Alternatively, you can specify the<br />

null hypothesis proportion with the P= option in the TABLES statement.<br />

See the section “Odds Ratio and Relative Risks for 2 x 2 Tables” on page 122 for<br />

details on computation of exact confidence limits for the odds ratio for 2 × 2 tables.<br />

See the section “Exact Confidence Limits for the Common Odds Ratio” on page 138<br />

for details on computation of exact confidence limits for the common odds ratio for<br />

stratified 2 × 2 tables.<br />

Definition of p-Values<br />

For several tests in PROC FREQ, the test statistic is nonnegative, and large values of<br />

the test statistic indicate a departure from the null hypothesis. Such tests include the<br />

Pearson chi-square, the likelihood-ratio chi-square, the Mantel-Haenszel chi-square,<br />

Fisher’s exact test for tables larger than 2 × 2 tables, McNemar’s test, and the one-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!