Programming the statistical procedures from SAS

less verbose PROC FREQ output

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

less verbose PROC FREQ output

I invoke PROC FREQ like the following, and I would prefer to clean up the output.  Omitting Fisher's exact test would be a good start.  Also, I only need the basic Chi-Square statistic and not the 6 others.

proc freq data= year_ago;

    tables a * b / chisq nocol nopercent;

run;

Do I need some obscure ODS commands, or output to a data set and go from there, or is there an easier way?


Accepted Solutions
Solution
‎01-26-2012 06:53 PM
Super User
Posts: 18,542

less verbose PROC FREQ output

You can select the tables/results you'd like to see using the ODS SELECT TABLENAMES statement.

To figure out the ODS TABLE names check the docs for proc freq or run your procedure with ODS TRACE ON;

Just a note though, in my version I think fishers only shows up when it thinks its necessary, versus all the time.

ods select crosstabfreqs chisq;

proc freq data=sashelp.heart;

table Chol_Status*sex/chisq nocol nopercent;

run;

View solution in original post


All Replies
Solution
‎01-26-2012 06:53 PM
Super User
Posts: 18,542

less verbose PROC FREQ output

You can select the tables/results you'd like to see using the ODS SELECT TABLENAMES statement.

To figure out the ODS TABLE names check the docs for proc freq or run your procedure with ODS TRACE ON;

Just a note though, in my version I think fishers only shows up when it thinks its necessary, versus all the time.

ods select crosstabfreqs chisq;

proc freq data=sashelp.heart;

table Chol_Status*sex/chisq nocol nopercent;

run;

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 126 views
  • 0 likes
  • 2 in conversation