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.

80 Chapter 2. The FREQ Procedure<br />

Using TABLES Statement Options with the EXACT Statement<br />

If you use only one TABLES statement, you do not need to specify options in the<br />

TABLES statement that are identical to options appearing in the EXACT statement.<br />

PROC FREQ automatically invokes the corresponding TABLES statement option<br />

when you specify the option in the EXACT statement. However, when you use multiple<br />

TABLES statements and want exact computations, you must specify options in<br />

the TABLES statement to compute the desired statistics. PROC FREQ then performs<br />

exact computations for all statistics that are also specified in the EXACT statement.<br />

OUTPUT Statement<br />

OUTPUT < OUT= <strong>SAS</strong>-data-set > options ;<br />

The OUTPUT statement creates a <strong>SAS</strong> data set containing statistics computed by<br />

PROC FREQ. The variables contain statistics for each two-way table or stratum, as<br />

well as summary statistics across all strata.<br />

Only one OUTPUT statement is allowed for each execution of PROC FREQ. You<br />

must specify a TABLES statement with the OUTPUT statement. If you use multiple<br />

TABLES statements, the contents of the OUTPUT data set correspond to the last<br />

TABLES statement. If you use multiple table requests in a TABLES statement, the<br />

contents of the OUTPUT data set correspond to the last table request.<br />

For more information, see the section “Output Data Sets” on page 148.<br />

Note that you can use the Output Delivery System (ODS) to create a <strong>SAS</strong> data set<br />

from any piece of PROC FREQ output. For more information, see Table 2.11 on page<br />

159 and Chapter 14, “Using the Output Delivery System.” (<strong>SAS</strong>/STAT User’s <strong>Guide</strong>)<br />

You can specify the following options in an OUTPUT statement.<br />

OUT=<strong>SAS</strong>-data-set<br />

names the output data set. If you omit the OUT= option, the data set is named DATAn,<br />

where n is the smallest integer that makes the name unique.<br />

options<br />

specify the statistics that you want in the output data set. Available statistics are those<br />

produced by PROC FREQ for each one-way or two-way table, as well as the summary<br />

statistics across all strata. When you request a statistic, the OUTPUT data set contains<br />

that estimate or test statistic plus any associated standard error, confidence limits, p-<br />

values, and degrees of freedom. You can output statistics by using group options<br />

identical to those specified in the TABLES statement: AGREE, ALL, CHISQ, CMH,<br />

and MEASURES. Alternatively, you can request an individual statistic by specifying<br />

one of the options shown in the following table.

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

Saved successfully!

Ooh no, something went wrong!