Date: Fri, 22 Aug 2008 10:17:37 -0400
Reply-To: Jonas Bilenas <jonas.bilenas@CHASE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jonas Bilenas <jonas.bilenas@CHASE.COM>
Subject: Re: Proc Freq with format?
You can try to get this done with PROC TABULATE. Check out my SGF paper:
http://www2.sas.com/proceedings/forum2007/230-2007.pdf
On page 14 there is a discussion of this issue in section titled "The
Missing Class Level Problem".
Application to your problem (you won't need the pct picture unless you need
percentages):
proc format;
value taround
0='0'
1='24'
2='48'
3-high='48+'
;
picture pct (round) low-high = '009.99%'
;
run;
data classes;
do taround=0 to 3;
output;
end;
run;
proc tabulate data=yourdata noseps formchar=' '
classdata=classes missing;
class type taround;
format taround taround.;
table type
all
,
(taround
all
)
*n*f=comma6.
/rts=20 row=float misstext=' 0';
run;
On Fri, 22 Aug 2008 05:05:18 -0700, Ben <ben.dray@GMAIL.COM> wrote:
>Hi all,
>
>is it possible to use proc freq (or another proc if not) to give the
>frequency of zero for another categories from a format which are
>missing from the actual data?
>
>eg:
>
>value taround
> 0='0'
> 1='24'
> 2='48'
> 3-high='48+'
>;quit;
>
>to give the 48+ column still....
>
>type taround
>
> 0? 24, 48, 48+
>A? 15? 9? 24, 0
>B? 1? 1 ? 2, 0
>
>Thanks,
>
>Ben