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

My code: 

ODS OUTPUT ChiSq = data set (DROP = TABLE WHERE = (STATISTIC = 'Chi-Square'));

PROC PRINT DATA =data set;
RUN;

 I get the following warning:

WARNING: Output 'ChiSq' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option is not used.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Allie_Haun
Fluorite | Level 6

Hi Kristie, 

Try adding 

PROC FREQ DATA= LibName.Name;

TABLES  Hypertension * State / NOPERCENT NOROW MISSING NOCUM CHISQ;

RUN; 

It took me a while to get this on my code and this is what worked

 

View solution in original post

5 REPLIES 5
ballardw
Super User

The ODS OUTPUT statement needs to come immediately before in the body of Proc Freq.

Since you show not Proc Freq code there is nothing to create chi-square output of any flavor.

 

kristiepauly1
Fluorite | Level 6
That worked for me. I had 2 ODS OUTPUT statements and was thinking the
proc freq I ran with the first one was sufficient when I ran this one.
Thanks!
Allie_Haun
Fluorite | Level 6

Hi Kristie, 

Try adding 

PROC FREQ DATA= LibName.Name;

TABLES  Hypertension * State / NOPERCENT NOROW MISSING NOCUM CHISQ;

RUN; 

It took me a while to get this on my code and this is what worked

 

kristiepauly1
Fluorite | Level 6
Thanks Allie. That was all it was. I wrote a PROC FREQ for the
StatePercents and thought that was sufficient. During office hours I tried
adding the PROC FREQ after the ODS OUTPUT but it did not work. Now of
course, it worked. Sas hates me. Good Luck!
ballardw
Super User

@kristiepauly1 wrote:
Thanks Allie. That was all it was. I wrote a PROC FREQ for the
StatePercents and thought that was sufficient. During office hours I tried
adding the PROC FREQ after the ODS OUTPUT but it did not work. Now of
course, it worked. Sas hates me. Good Luck!

Likely not any where near as much as Excel hates me (an vice versa)😉

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1274 views
  • 0 likes
  • 3 in conversation