Hi, I am attempting to create a new dataset in which a new ethnicity variable 'nonmapac' is derived. This variable will eventually be used for comparisons. However, when I run the program, all the observations = 1 (which is not the case). I'm not sure where I am going wrong. The code is as below: data new; set primhd.clients; nonmapac=0; if ethnicgp ne 21 or ethnicg1 ne 21 or ethnicg2 ne 21 or ethnicg3 ne 21 or ethnicgp ne 30 or ethnicg1 ne 30 or ethnicg2 ne 30 or ethnicg3 ne 30 or ethnicgp ne 31 or ethnicg1 ne 31 or ethnicg2 ne 31 or ethnicg3 ne 31 or ethnicgp ne 32 or ethnicg1 ne 32 or ethnicg2 ne 32 or ethnicg3 ne 32 or ethnicgp ne 33 or ethnicg1 ne 33 or ethnicg2 ne 33 or ethnicg3 ne 33 or ethnicgp ne 34 or ethnicg1 ne 34 or ethnicg2 ne 34 or ethnicg3 ne 34 or ethnicgp ne 35 or ethnicg1 ne 35 or ethnicg2 ne 35 or ethnicg3 ne 35 or ethnicgp ne 36 or ethnicg1 ne 36 or ethnicg2 ne 36 or ethnicg3 ne 36 or ethnicgp ne 37 or ethnicg1 ne 37 or ethnicg2 ne 37 or ethnicg3 ne 37 then nonmapac=1; run;
... View more