Date: Fri, 29 Dec 2000 12:37:39 0500
ReplyTo: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Sender: "SPSSX(r) Discussion" <SPSSXL@LISTSERV.UGA.EDU>
From: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Subject: Re: Aggregating data in SPSS
InReplyTo: <850FE2CA73BAD01187FA0060976710C2051B1E52@CCI_EXCHANGE>
ContentType: text/plain; charset="iso88591"
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 rlevesque@videotron.ca
> Original Message
> From: SPSSX(r) Discussion [mailto:SPSSXL@LISTSERV.UGA.EDU]On Behalf Of
> Steven Delaronde
> Sent: Thursday, December 28, 2000 11:54 AM
> To: SPSSXL@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
> relatedsamples test or dependent ttest. 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 ttest. 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
> Email: delaronde@connecticare.com
