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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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