/******************** Variables Used ********************/ /**Variable Names in Program Variable Names in Gator**/ HH1UID01-17 HHI2_UID.01-.17 SH931-5 SH93.01-.05 YID YOUTH_ID.01 REL_r1 CV_YTH_REL_HH_CURRENT REL_r2 CV_YTH_REL_HH_CURRENT REL_r3 CV_YTH_REL_HH_CURRENT REL_r4 CV_YTH_REL_HH_CURRENT REL_r5 CV_YTH_REL_HH_CURRENT REL_r6 CV_YTH_REL_HH_CURRENT hhage01-13 HHI_AGE.01-.13 hhest_01-06 HHI_AGEEST.01-.06 marry_1-13 HHI_MARSTAT.01-.13 hhrel_1-13 HHI_RELY.01-.13 HHUID01-13 HHI_UID.01-.13 age SYMBOL!KEY!AGE pubid PUBID /******************** SAS code for variable creation ********************/ if hhrel_01~=-5; array hhrel (*) hhrel_01-hhrel_13; array hhmst (*) hhmst_01-hhmst_13; array hhage (*) hhage_01-hhage_13; array hhuid (*) hhuid_01-hhuid_13; array hhest (*) hhest_01-hhest_06; array hhuid1 (*) hhuid1_01-hhuid1_17; ** Set age of Household members using estimated age when actual age is not known.; do i=1 to 6; * Set age of household member to 25 when estimated his/her age is over 25 (estimated age = 4, 5, 6); if hhest(i)>3 then hhage(i)=25; * Set age of household member to 17 when estimated his/her age is under 18 (estimated age = 1, 2); if hhest(i) in (1,2) then hhage(i)=17; end; ** This part identifies legal guardians so that we can determine whether any guardians are present from the Round 1 interview using only unique IDs. IDs of Household members after Round 1 have 6 digits, so this program will not identify any household member from any round other than Round 1 as the legal guardian. This is necessary as we don't have information on legal guardian status for Household members after Round 1.; do i=1 to 17; if yid=1 & sh93_01>0 & sh93_01+100=hhuid1(i) then uid=hhuid1(i); if yid=2 & sh93_02>0 & sh93_02+100=hhuid1(i) then uid=hhuid1(i); if yid=3 & sh93_03>0 & sh93_03+100=hhuid1(i) then uid=hhuid1(i); if yid=4 & sh93_04>0 & sh93_04+100=hhuid1(i) then uid=hhuid1(i); if yid=5 & sh93_05>0 & sh93_05+100=hhuid1(i) then uid=hhuid1(i); end; ** Household member identified as the legal guardian in Round 1 is present in the household in Round7. legal>0 for N=60.; legal=0; do i=1 to dim(hhuid); if uid~=. & uid=hhuid(i) then do; legal=hhrel(i); legal_ag=hhage(i); end; end; ** At least one member in the household is an adult (21 years and over); do i=1 to dim(hhuid); if hhage(i)>20 then adulthh=1; end; ** Relation of Legal Guardian to Youth; * Grandparent; lgrand=0; if 28-4 then indep=0; end; ** Relation of Non Legal Guardians to the Youth; nlgrand=0; nlspouse=0; nlsibs=0; nlrltv=0; nlnrltv=0; nlinv=0; do i=1 to dim(hhuid); * Grandparent; if 2820 then nlsibs=1; * Aunt/Uncle and Other Relatives; if 6920 then nlrltv=1; * Lover/Roommate/Other Non-relative/Mother's or Father's Partner; if hhrel(i) in (69,68,85,88,89) then nlnrltv=1; * Invalid; if hhrel(i) in (-1,-2,-3) then nlinv=1; end; ** For all youth; grand=lgrand; spouse=lspouse; sibs=lsibs; rltv=lrltv; nrltv=lnrltv; inv=linv; if nlspouse~=. then spouse=nlspouse; ** Identifying the parent figure in the household; mother=0; father=0; adpdad=0; adpmom=0; fstmom=0; fstdad=0; stpmom=0; stpdad=0; both=0; do i=1 to dim(hhuid); if hhrel(i)=3 then mother=i; if hhrel(i)=4 then father=i; if hhrel(i)=5 then adpmom=i; if hhrel(i)=6 then adpdad=i; if hhrel(i)=7 then stpmom=i; if hhrel(i)=8 then stpdad=i; if hhrel(i)=9 then fstmom=i; if hhrel(i)=10 then fstdad=i; end; if mother>0 & father>0 then both=1; ** Creating the final variable - REL; REL=10; if inv=1 then REL=-3; if indep=1|(inv~=1 & nrltv>0) then REL=10; if inv~=1 & (rltv>0|sibs>0) then REL=9; if grand>0 & mother=0 & father=0 then REL=8; if spouse=1|stpdad>0|stpmom>0 then REL=10; if fstdad>0|fstmom>0 then REL=7; if adpmom>0|adpdad>0 then REL=6; if father>0 & mother=0 then REL=5; if mother>0 & father=0 then REL=4; if father>0 & mother=0 & (adpmom>0|stpmom>0) then REL=3; if mother>0 & father=0 & (adpdad>0|stpdad>0) then REL=2; if mother>0 & father>0 then REL=1; endsas;