Date: Fri, 16 May 1997 08:41:14 -0400
Reply-To: Ed Heaton <edheaton@FENIX2.DOL-ESA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Ed Heaton <edheaton@FENIX2.DOL-ESA.GOV>
Subject: PROC SUMMARY: CLASS with NWAY vs. BY
Greetings all;
I have a dataset and I wish to sum certain variables (d, e, and f) based
on the levels of other variables (a, b, and c). All these variables are
numeric. I see two ways to accomplish this task with PROC SUMMARY:
PROC SUMMARY
DATA= sample (KEEP= a b c d e f)
NWAY
;
CLASS a b c ;
VAR d e f ;
OUTPUT
OUT= sampout1
SUM=
;
RUN ;
and
PROC SUMMARY
DATA= sample (KEEP= a b c d e f)
;
BY a b c ;
VAR d e f ;
OUTPUT
OUT= sampout2
SUM=
;
RUN ;
What is the difference?
Thanks, in advance, for your insight.
Edward Heaton, Systems Development Specialist,
CDSI Information Technology Solutions Company
(A Division of Computer Data Systems, Inc.)
On contract for:
U.S. Department of Labor, Room N-4420,
200 Constitution Avenue, Northwest, Washington, DC 20210
(202) 219-7950 edheaton@fenix2.dol-esa.gov
|