I am trying to get this output to run for a Chi Square, here is my Code:
ODS Trace on;
Proc Freq Data=hypanl.hypanalysis2;
Tables hypreldeathInd * StateCd / Nopercent norow nocum chisq;
Run;
ODS Trace Off;
ODS OUTPUT CrossTabFreqs=HRslt.Percents (KEEP = Cd DeathInd Frequency ColPercent
WHERE = (DeathInd = 1 AND MISSING (Cd)=0));
ODS OUTPUT Chisq=HRslt.ChiSqResults
(DROP=TABLE
WHERE= (Statistic= 'Chi Square'));
PROC PRINT DATA=H.Percents;
RUN;
PROC PRINT DATA=H.ChiSqResults;
RUN;
I am getting this Error in the log:
Your ODS OUTPUT statements belong immediately before or inside PROC FREQ. It doesn't work where you put it, after PROC FREQ ended.
Show us the log for your PROC FREQ, including all WARNINGs, ERRORs, NOTEs and the actual code for PROC FREQ as it appears in the log. Do not chop anything out.
Please provide the log following these instructions (and not via any other method): copy the log as text from the SAS log window, and paste it into the window that appears when you click on the </> icon.
Maxim 2: Read the log.
NOTE: No statistics are computed for HypRelDeathInd * StateCd because HypRelDeathInd has fewer than 2 nonmissing levels.
Your data is not appropriate for this test.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.