Hi SAS communities,
I am attempting to use a WHERE= option in my ODS Output statement to pull in observations where variable HypRelDeathInd=1 and variable StateCd is a non-missing value. I've tried using a MISSING function by coding it as "WHERE Not Missing(StateCd)", but that yielded a syntax error in the log. Any other suggestions for how I can change my code to pull in non-missing values for my StateCd variable? Thank you in advance!
Here is the code I've described:
PROC FREQ DATA = Work.Analysis2;
TABLES HypRelDeathInd*StateCd / NOPERCENT NOROW CHISQ;
ODS OUTPUT CrossTabFreqs = HypRslt.StatePercents (WHERE = (HypRelDeathInd=1 and WHERE Not Missing(StateCd)));
ODS OUTPUT ChiSq = HypRslt.ChiSqResults (WHERE = (Statistic='Chi- Square'));
RUN;
QUIT;