Hello! I am looking for help creating a 0/1 categorical variable, where 0 = negative for the specified condition and 1 = positive for the specified condition. The statement I am using (pasted below) pulls in a bunch of different variables that must meet certain criteria to be slated into the "1" category. I want to verify that 1) what I am doing is correct, and my statements aren't overwriting any previous statements, and 2) see if there is a better way to do this, perhaps using an array of some kind (?) Any advice is welcome, and I would be happy to provide further explanations if necessary. Thank you! */ Number of persons identified as having experienced FM3strong = 1 plus VALUE = 1 or LABOR = 1; OR number of persons answering yes to 2 or more of the following: R1strong, EP1strong, PL1strong, DC3strong, FM1strong or FM2strong, V3strong or V4strong, plus VALUE = 1 or LABOR = 1; OR number of persons answering yes to at least 1 of the following: R1strong, EP1strong, PL1strong, DC3strong, FM1strong, FM2strong, V3strong, V4strong PLUS answering yes to 3 or more of the following: EP5med, EP6med, EP7med, FM4med, V8med, plus VALUE = 1 or LABOR = 1. */ TIPlifenum =.; if FM3strong = 1 and VALUE = 1 then TIPlifenum = 1; else if FM3strong = 1 and LABOR = 1 then TIPlifenum = 1; else if sum(R1strong, EP1strong, PL1strong, DC3strong, FM1strong, V3strong) ge 2 or sum (R1strong, EP1strong, PL1strong, DC3strong, FM1strong, V4strong) ge 2 or sum(R1strong, EP1strong, PL1strong, DC3strong, FM2strong, V3strong) ge 2 or sum(R1strong, EP1strong, PL1strong, DC3strong, FM2strong, V4strong) ge 2 and VALUE = 1 then TIPlifenum = 1; else if sum(R1strong, EP1strong, PL1strong, DC3strong, FM1strong, V3strong) ge 2 or sum (R1strong, EP1strong, PL1strong, DC3strong, FM1strong, V4strong) ge 2 or sum(R1strong, EP1strong, PL1strong, DC3strong, FM2strong, V3strong) ge 2 or sum(R1strong, EP1strong, PL1strong, DC3strong, FM2strong, V4strong) ge 2 and LABOR = 1 then TIPlifenum = 1; else if sum (R1strong, EP1strong, PL1strong, FM1strong, FM2strong, V3strong, V4strong) ge 1 and sum(EP5med, EP6med, EP7med, FM4med, V8med) ge 3 and VALUE = 1 then TIPlifenum = 1; else if sum (R1strong, EP1strong, PL1strong, FM1strong, FM2strong, V3strong, V4strong) ge 1 and sum(EP5med, EP6med, EP7med, FM4med, V8med) ge 3 and LABOR = 1 then TIPlifenum = 1; else TIPlifenum = 0;
... View more