Hi Jan,
Did you mean the following?
compute A3 = Audit_Freq + Audit_Daily + Audit_GT.
DO IF ( MR_SEX = 1 and A3 ge 5).
compute Audit_Score = 1.
ELSE IF(MR_SEX = 2 and A3 ge 4).
compute Audit_Score = 1.
ELSE.
compute Audit_Score = 0.
END IF.
EXECUTE.
From: J McClure <mc006@pacbell.net>
To: SPSSX-L@LISTSERV.UGA.EDU
Sent: Tue, August 3, 2010 3:32:26 PM
Subject: calculating new variable by gender
I want to calculate a new variable AUDITC_Score. It will be dichotomous with 0 (no) and 1 (yes). The threshold for AUDITC_Score 'yes' for women is ≥ 4 and for men ≥ 5. The threshold is calculated as the sum of the points for three separate variables: AUDIT_Freq, AUDIT_Daily, and AUDIT_GT5. Gender is MR_sex with 1=male and 2=female. I can calculate the score (using the drop down menu :-( ) but can't figure out how to make it different for men and women. I'm working on using
syntax instead of the drop down so a syntax answer would be great. I'll use it as a template for other derived variables. (I am using PASW 18.)
Thanks for your help,
Jan
===================== 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