/*File name: R15citizen This program is to create current citizenship status [CV_CITIZEN_CURRENT]. * Vriable created in program: Variable in CD: CITIZEN CV_CITIZEN_CURRENT 1. Citizen, born in the US 2. Citizen, naturalized 3. Applicant for naturalization 4. Permanent resident 5. Applicant for Permanent residence 6. Other varible variable in program in gator CITIZEN1997 CV_CITIZENSHIP_1997 CITIZEN2001 CV_CITIZEN_CURRENT_2001 CITIZEN2002 CV_CITIZEN_CURRENT_2002 CITIZEN2003 CV_CITIZEN_CURRENT_2003 CITIZEN2004 CV_CITIZEN_CURRENT_2004 CITIZEN2006 CV_CITIZEN_CURRENT_2006 CITIZEN2007 CV_CITIZEN_CURRENT_2007 CITIZEN2008 CV_CITIZEN_CURRENT_2008 CITIZEN2009 CV_CITIZEN_CURRENT_2009 CITIZEN20010 CV_CITIZEN_CURRENT_2010 INT_M CV_INTERVIEW_DATE~M INT_Y CV_INTERVIEW_DATE~Y H55700A YHHI-55700A CHK R PREVIOUSLY REPORTED US CITIZENSHIP usborn YHHI-55701 WAS R BORN IN U.S., ITS TERRITORIES OR PUERTO RICO sborn YHHI-55702 STATE OR TERRITORY WHERE R BORN cborn YHHI-55703 COUNTRY WHERE R WAS BORN citist YHHI-55704 WHAT IS R'S CITIZENSHIP STATUS cciti YHHI-55705A CHK R IS NOT A U.S. CITIZEN nocitist1 YHHI-55706~000001 Applicant for naturalization to become U.S. citizen" nocitist2 YHHI-55706~000002 "Have a 'Green Card' Lawful Permanent Resident of the U.S." nocitist3 YHHI-55706~000003 "Applicant 'Green Card' Lawful Permanent Residence (LPR)" nocitist4 YHHI-55706~000004 "Refugee/Asylee/Entrant" nocitist5 YHHI-55706~000005 "On temporary visa" nocitist6 YHHI-55706~000006 "Living outside of the U.S. at this time" nocitist7 YHHI-55707~000007 "Other" PUBID PUBID */ %let n=10; %let k=7; array citi_ (&n); array nocitist (&k); do i=1 to (&n); if citi_(i)>-4 then citizen=citi_(i); end; if (usborn=1 | citist=1) then citizen=1; else if citist=2 then citizen=2; else if citist=3 and cciti=1 then do; if nocitist1 =1 then citizen=3; else if nocitist2=1 then citizen=4; else if nocitist3=1 then citizen=5; else if (nocitist4=1 | nocitist5=1 | nocitist6=1 | nocitist7=1) then citizen=6; end; do i=1 to (&k) ; if nocitist(i) in (-1,-2) then citizen=-3; end; if -41) then problem2=1; if problem2=1 then citizen=-3; end; /* All YHHI-557001 are 0. R's need to pick one of them */ if count0=7 then citizen=-3; endsas;