Aren't u forgetting the commas in between the operands for sum? Hope you are keeping a space between ge operator and the value 5. Put the EXECUTE command to execute.
 
HTH.
 
Samir Paul
382 Main Street
ON M4C 4X8, Toronto
Canada
Cell - (416) 570 5696
Home - (416) 686 9958
Fax - (416) 686 9958
Skype - paulsamir.2009



From: J McClure <mc006@pacbell.net>
To: SPSSX-L@LISTSERV.UGA.EDU
Sent: Sat, August 7, 2010 9:47:19 AM
Subject: conditional compute syntax incorrect

I am now calculating the score of a 9 item depression questionnaire
(PHQ-9). I have dichotomized the 9 questions into the variables
PHQ_tiredS, PHQ_sleepS,  PHQ_eatS, PHQ_concS, PHQ_badS,  PHQ_movemtS,
PHQ_anhedS,  PHQ_downS, and PHQ_deathS (0=no and 1=yes). The criteria
for the new variable ( MajDeprsn) to be positive (yes=1) is two part.
First either PHQ_anhedS or  PHQ_downS must be positive (=1) and then the
sum of all 9 variables must be 5 or greater. Results from this code are
all 482 cases=0. I think my parenthesis are wrong.  Thanks, Jan


Compute MajDeprsn=0.
If (PHQ_anhedS=1 or PHQ_downS=1) and sum(PHQ_tiredS PHQ_sleepS
PHQ_eatS PHQ_concS PHQ_badS
  PHQ_movemtS PHQ_anhedS PHQ_downS PHQ_deathS) ge5  MajDeprsn=1.
FREQUENCIES  MajDeprsn.

=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD