Just learning SAS EG, and this has me completely stumped. I would like to recode a variable dependent on the value of a different variable for the same row. The example I am working with is this: Males do not menstruate, so I would want to exclude the age of menstruation for Males. I attempted to create a recoded column marking the age of menstruation as missing for males using a CASE statement, but my new column had 1s and 0s instead of the original value. The advanced expression was: CASE WHEN 'Gender' = 'M' THEN 'AgeMenst' = . ELSE 'AgeMenst' = 'AgeMenst' END What am I doing wrong? I have tried multiple different combinations. I've tried leaving out the ELSE statement.
... View more