Date: Sat, 25 Feb 2012 00:24:27 +0800
Reply-To: deepanshu bhalla <deepanshu_bhalla@yahoo.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: deepanshu bhalla <deepanshu_bhalla@yahoo.com>
Subject: Data Transformation
Content-Type: multipart/alternative;
Hi Team,
I have 2 questions :
(1) How can we compress the below select if command ?
Select if age = 1 or age = 2 or age =3 or age =4.
execute.
I mean can we do the transformation like this ( or some other cool way to do this problem ):
Define age () 1 2 3 4.
!ENDDEFINE.
Select if age.
Execute.
(2) Aggregate command :
Define Demogs () Age !ENDDEFINE.
AGGREGATE
/OUTFILE=* MODE=ADDVARIABLES
/BREAK=q1 Demogs
/v18_mean=MEAN(v18)
/v19_mean=MEAN(v19).
How can we use the above aggregate function for multiple demogs such as TOJ,GENDER,AGE?
Define Demogs() TOJ GENDER AGE !ENDDEFINE.
I want syntax that would first go to first demog i.e TOJ and once aggregate is completed it go to second demog and goes on...( NOTE : I want data breaked by only one demog at one time )
Thanks in advance !
[text/html]
|