Date: Mon, 21 Jul 2003 17:02:49 -0400
Reply-To: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject: Re: Help with Freq..
> From: Nagakumar Sridhar [mailto:nsridhar@ATHEROGENICS.COM]
> I need some help with the Proc freq procedure. I
> merged 2 datasets (both containing data with sex='Female'
> only) into a new dataset (xyz). When I do a proc freq on
> dataset xyz, I need to have the count for male (although = 0)
> displayed. Right now, it displays only the female count.
sparse is the FREQ tables option that you want
proc FREQ data = LIBRARY.WHATEVER;
/ list missing noprint sparse
out = WORK.FREQ
YeahBut sparse will pad your output
in cross-tabs when there are no instances in that level.
if the data contains no instances of sex=Male
then sparse is useless
and you'll have to add a row in a data step.
set FREQ end = EndoFile;
if EndoFile then do;Sex=Male;output;end;stop;
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
remember perspective: the error is not always where it seems to occur! --