Hi, i have a dataset like this: var1 var2 var3 var4 x L0 0 U 1 SI 0 1 50 1 1M 0 and I would like to generate a code conditional on the data. This is the code I would like to obtain: if var3='L0' then x=0; if var1='U' then x=1; if var2='SI' then x=0; if var1='1' and var2='50' then x=1; if var4='1M' then x=0; As you can see when a variable is missing, I don't want the condition to contain it while when there is more than one not missing variables I would like a condition containing all not missing variables linked by an "and". I tried with a data _null_ code without success. Can you suggest me the code? Any help is really appreciated. Thank you very much in advance F.
... View more