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 1997)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Jan 1997 13:31:49 GMT
Reply-To:     Moshe Braner <mbraner@GNU.UVM.EDU>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         Moshe Braner <mbraner@GNU.UVM.EDU>
Organization: EMBA Computer Facility, The University of Vermont
Subject:      Re: Uconventional AGGREGATE?

Finn-Mogens Haug (f.m.haug@basalmed.uio.no) wrote: : We need to preprocess datasets, aggregating individual : ... : This could be achieved with an imagined option to AGGREGATE, : which would cause a break

: WHEN the aggregated value of a numeric variable : (particle count or number of cases) reaches a limit : OR WHEN the value of some standard break-variable changes

You can create your own additional break variable, something like this: (untested syntax!)

do if ($casenum eq 1). + compute brk = 0. + compute #cumsum = 0. else. + compute #cumsum = #cumsum + lag(yourvar). + do if (#cumsum > some constant). + compute brk = brk + 1. + compute #cumsum = 0. + end if. end if. agg outfile=* /break=brk...

-- Moshe Braner <Moshe.Braner@uvm.edu> 47 McGee Road, Essex Junction, VT 05452 USA (802) 879-0876


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