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 (January 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Jan 2008 11:39:00 -0600
Reply-To:     "data _null_," <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_," <datanull@GMAIL.COM>
Subject:      Re: Cummulative sum other subgroup
Comments: To: djassy@gmail.com
In-Reply-To:  <facc32fc-9e16-41cf-9d41-18a078c74616@v46g2000hsv.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

PROC FREQ can be use for that.

proc freq; by an mo; tables de / noprint out=csum outcum; weight ct; run; proc print; run;

On Jan 21, 2008 10:57 AM, <djassy@gmail.com> wrote: > Is there someone to help me? > I would like to calculate cc as cumulative sum of ct, group by an, mo, > de > > > an mo de cc ct > 1 1 1 5 5 > 1 1 2 7 12 > 1 1 3 6 18 > 1 2 1 8 8 > 1 2 2 3 11 > 2 1 1 9 9 > 2 1 2 6 15 > 2 2 1 4 4 > > data test ; > input an mo de ct; > datalines; > 1 1 1 5 > 1 1 2 7 > 1 1 3 6 > 1 2 1 8 > 1 2 2 3 > 2 1 1 9 > 2 1 2 6 > 2 2 1 4 > ; > proc print; > run; >


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