LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page