As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Capturing and Presenting PROC TTEST Results using ODS and PROC REPORT

From sasCommunity
Jump to: navigation, search


Patrick Thornton


Thornton, S. P. (2009). Capturing and Presenting PROC TTEST Results using ODS and PROC REPORT. Proceedings of the Seventeenth Annual Western Users of the SAS® Software Conference, San Jose, CA


This paper describes for the intermediate SAS® programmer how to consolidate the results of PROC TTEST into a concise and customizable tabular format. The paper describes ODS OUTPUT syntax to create data sets containing PROC TTEST results, basic PROC SQL syntax to join the data sets, and ODS LAYOUT and PROC REPORT syntax to create tables in PDF format. Macro programs are included to facilitate the reuse of the syntax.


PROC TTEST may be used to conduct an independent sample t-test with minimal syntax.
Proc Ttest data= wuss2009.mydata;
Class condition;
Var aet_aet2;
The output produces the folded form of the F statistic to test for the equality of the variances of the two groups and t statistics, degrees of freedom, and probabilities that are appropriate for the case of equal and unequal variances. If the variances are statistically equivalent then the “Pooled” test is appropriate and if not the “Satterthwaite” is used. The disadvantage of this output is that the results are forever married to the style and format of the listing output; however, ODS allows the results to be saved as data sets that can then be used in customized output

Download Paper

Media:WUSS-2009-Thornton-ODS PDF Ttest.pdf