My code:
ODS OUTPUT ChiSq = data set (DROP = TABLE WHERE = (STATISTIC = 'Chi-Square'));
PROC PRINT DATA =data set;
RUN;
I get the following warning:
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
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.
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 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)😉
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.