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 (December 2000)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Dec 2000 12:37:39 -0500
Reply-To:     Raynald Levesque <rlevesque@VIDEOTRON.CA>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <rlevesque@VIDEOTRON.CA>
Subject:      Re: Aggregating data in SPSS
Comments: cc: Steven Delaronde <Delaronde@CONNECTICARE.COM>
In-Reply-To:  <850FE2CA73BAD01187FA0060976710C2051B1E52@CCI_EXCHANGE>
Content-Type: text/plain; charset="iso-8859-1"

Hi Steven

This seems to solve your data aggregation problem:

COMPUTE cost1=cost*(int=1). COMPUTE cost2=cost*(int=2).

AGGREGATE /OUTFILE=* /BREAK=personid /precost = SUM (cost1) /postcost = SUM (cost2) .

Raynald Levesque

> -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of > Steven Delaronde > Sent: Thursday, December 28, 2000 11:54 AM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Aggregating data in SPSS > > > I have an SPSS data set that is not arranged so that I can conduct a two > related-samples test or dependent t-test. Is there a way to > aggregate data > so that I can sum an aggregate variable only when a certain condition is > met? For example, I want to add an IF statement to the following syntax > such that the new variables (precost and postcost) are equal to the sum of > the cost for only those cases that meet a specific condition (i.e., before > the intervention (int=1) and after the intervention (int=2), > respectively). > > AGGREGATE > /OUTFILE='F:\Aggr.sav > /BREAK=personid > /precost = SUM (cost) /postcost = SUM (cost) . > > After I rearrange the data set so that I have a precost and postcost > variable, I can compare the two costs using a dependent t-test. After > making this bivariate comparison, I'm not sure if SPSS has the capacity to > perform multivariate analysis using related samples. Any > suggestions would > be greatly appreciated. > > Steve Delaronde > ConnectiCare, Inc. > Farmington, Connecticut, USA > E-mail:

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