BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AndrewZ
Quartz | Level 8

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

1 REPLY 1
Reeza
Super User

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;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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