Hello, I have a question: I am working with the Allbus 2004 (like a census) and Need to eliminate all People, who do not have children in the household. For that, I tried to use the following Code: if v483 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then v483=.;
if v493 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then v493=.;
if v503 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then v503=.;
if v513 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then V513=.;
if v523 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then V523=.;
if v533 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then v533=.;
if v543 in (1 2 5 6 7 8 9 10 11 12 13 14 15 16 99) then v543=.;
run; In the codebook, the questions for These variable are roughly translated "what is the relation for Household member Number (and then it goes 2, 3, ... for every mentioned variable) to you" Now what I wanted to do is eliminate all the People, who did not answer with 3 or 4 (3=biological and 4=adoptive). I do not know though, how to eliminate a Person that didn't answer 3 or 4 even once in all those variables. I Need to know now if 1. my logic is right in this Code and 2. how I can Kind of chain These together. Can I use "&" between each one? I ask this because I am actually not sure if coding a missing will "eliminate" this Person all together, so that the people who didn't answer V483 with 3 or 4 will not even be there anymore to be coded by the next if-statement. I really hope, that the way I described my Problem made even a Little sense. At this Point I am so confused by my own logic that I wasn't even able to describe it in my native language to my professor. Thank you for your time and help in advance!
... View more