RECODE
only takes a 1 to 1 mapping, and old value to a new value, it does not accept conditional statements like you have specified. You might consider a DO IF
block in this circumstance. (Hopefully no one has exactly 12 for education!)
DO IF (EDUC>12 AND GENDER='M').
COMPUTE GROUP=1.
ELSE IF (EDUC<12 AND GENDER='M').
COMPUTE GROUP=2.
ELSE IF (EDUC>12 AND GENDER='F').
COMPUTE GROUP=3.
ELSE IF (EDUC<12 AND GENDER='F').
COMPUTE GROUP=4.
END IF.
This evaluates the IF
statements case by case, and so if you have 1 million records falling into the (EDUC>12 AND GENDER='M')
and only a few falling into the other categories, for those million cases it will evaluate the first condition as true and will not evaluate the subsequent IF
statements (which is not true of writing out the equivalent IF
on multiple lines).