Date: Fri, 18 Jan 2002 17:34:55 GMT
Reply-To: "Andrew H. Karp" <sfbay0001@AOL.COMNOSPAMS>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Andrew H. Karp" <sfbay0001@AOL.COMNOSPAMS>
Organization: AOL http://www.aol.com
Subject: Re: Data Step Frequency?
Hi...other folks have given some potential data step solutions to this problem,
but I'd like to suggest a couple of things:
a) Use multiple TABLE statements in a single use of PROC FREQ. You should see
some time savings over using a separate PROC FREQ task for each table.
b) explore whether it makes sense to apply an index to the data set. You may
see some CPU savings vs a PROC SORT, since with an index you can do BY-group
processing on a non-sorted data set. You'd have to test whether or not the CPU
time required to build the index is more or less than the CPU required for the
PROC SORT task, however.
c) I am wondering if it might make sense to explore using PROC MEANS as an
intermediate step in this effort. Using the N statistics keyword, you could
count the number of non mising values of many combinations of variables, store
the results in a SAS data set, and then use PROC FREQ, with the WEIGHT
statement, on the data set that PROC MEANS created.
Just a few ideas....
Andrew H. Karp
Sierra Information Services, Inc.
A SAS Institute, Inc. Alliance Partner
19229 Sonoma Highway PMB 264
Sonoma, CA 95476 USA