Appendix 5: Income and Assets Variable Creation

Return to Table of Contents


Household Income and Assets

Variables Created:

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

Naamt241-Naamt252 AFDC_AMT_2000.01-.12 YAS4400 YAST-4400
Noamt241-Noamt252 OTHER_AMT_2000.01-.12 YAS4420 YAST-4420
Nuiamt241-Nuiamt252 UneMP_AMT_2000.01-.12 YAS4422 YAST-4422
Nwcamt241 WKCOMP_AMT_2000.01-.03 YAS4426 YAST-4426
YI_1400-YI_2700 YINC-1400 - YINC-2700 YAS4530 YAST-4530
YI_2900-YI_3100 YINC-2900 - YINC-3100 YAS4550 YAST-4550
YI_3300-YI_5400 YINC-3300 - YINC-5400 YAS4552 YAST-4552
YI_7600-YI_7800 YINC-7600 - YINC-7800 YAS4556 YAST-4556
YI_8700-YI_8900 YINC-8700 - YINC-8900 YAS4660 YAST-4660
YI_9200-YI_9400 YINC-9200 - YINC-9400 YAS4680 YAST-4680
YI_9600-YI_9900 YINC-9600 - YINC-9900 YAS4682 YAST-4682
YI_10100-YI_10400 YINC-10100 - YINC-10400 YAS4686 YAST-4686
YI_10800 YINC-10800 YAS4790 YAST-4790
I1110001-I1110015 YINC-11100.01-.15 YAS4810 YAST-4810
I1160001-I1160013 YINC-11600.01-.13 YAS4812 YAST-4812
I1170001-I1170013 YINC-11700.01-.13 YAS4816 YAST-4816
YAS50 YAST-050 YAS4840 YAST-4840
YAS1400 YAST-1400 YAS4842 YAST-4842
YAS1500 YAST-1500 YAS4846 YAST-4846
YAS1610 YAST-1610 YAS4870 YAST-4870
YAS1860 YAST-1860 YAS4880 YAST-4880
YAS1862 YAST-1862 YAS4900 YAST-4900
YAS1866 YAST-1866 YAS4902 YAST-4902
YAS2520 YAST-2520 YAS4906 YAST-4906
YAS2550 YAST-2550 YAS5040 YAST-5040
YAS2552 YAST-2552 YAS5060 YAST-5060
YAS2556 YAST-2556 YAS5062 YAST-5062
YAS2760 YAST-2760 A506601-A506620 YAST-5066.01-.20
YAS2762 YAST-2762 A507401-A507420 YAST-5074.01-.20
YAS2766 YAST-2766 A508001-A508020 YAST-5080.01-.20
YAS3310 YAST-3310 A508201-A508220 YAST-5082.01-.20
YAS3380 YAST-3380 YAS5130 YAST-5130
YAS3382 YAST-3382 YAS5150 YAST-5150
YAS3386 YAST-3386 YAS5152 YAST-5152
YAS3740 YAST-3740 A516401-A516420 YAST-5164.01-.20
YAS3750 YAST-3750 A517001-A517020 YAST-5170.01-.20
YAS3752 YAST-3752 A517201-A517220 YAST-5172.01-.20
YAS3756 YAST-3756 YAS5210 YAST-5210
YAS3790 YAST-3790 YAS5220 YAST-5220
YAS3810 YAST-3810 YAS5222 YAST-5222
YAS3812 YAST-3812 YAS5226 YAST-5226
YAS3840 YAST-3840 HIRELY01-HIRELY16 HHI_RELY.01-.16
YAS3860 YAST-3860 PUBID PUBID
YAS3880 YAST-3880 YAS1864L, U YAST-1864~000001, ~000002
YAS3882 YAST-3882 YAS2554L, U YAST-2554~000001, ~000002
YAS3910 YAST-3910 YAS2764L, U YAST-2764~000001, ~000002
YAS3920 YAST-3920 YAS3384L, U YAST-3384~000001, ~000002
YAS3922 YAST-3922 YAS3754L, U YAST-3754~000001, ~000002
YAS3950 YAST-3950 YAS3924L, U YAST-3924~000001, ~000002
YAS3960 YAST-3960 YAS3964L, U YAST-3964~000001, ~000002
YAS3962 YAST-3962 YAS4034L, U YAST-4034~000001, ~000002
YAS3966 YAST-3966 YAS4164L, U YAST-4164~000001, ~000002
YAS4010 YAST-4010 YAS4294L, U YAST-4294~000001, ~000002
YAS4030 YAST-4030 YAS4424L, U YAST-4424~000001, ~000002
YAS4032 YAST-4032 YAS4554L, U YAST-4554~000001, ~000002
YAS4036 YAST-4036 YAS4684L, U YAST-4684~000001, ~000002
YAS4140 YAST-4140 YAS4814L, U YAST-4814~000001, ~000002
YAS4160 YAST-4160 YAS4844L, U YAST-4844~000001, ~000002
YAS4162 YAST-4162 YAS4904L, U YAST-4904~000001, ~000002
YAS4166 YAST-4166 YAS5224L, U YAST-5224~000001, ~000002
YAS4270 YAST-4270 YAS25 YAST-025
YAS4290 YAST-4290 YAS60 YAST-060
YAS4292 YAST-4292 YAS70 YAST-070
YAS4296 YAST-4296 YAS105 YAST-105

 

This program creates the household net worth and gross household income variables. The household net worth variable is an actual number that results from adding the values of all assets and subtracting liabilities of the household.  The gross household income variable includes total annual cash receipts before taxes from all sources.  The program then creates a ratio comparing the household's total income to federal poverty guidelines based on the number of household residents and the number of members under age 18.

Researchers should note that, like many income and asset variables in the data set, these three variables are topcoded to protect respondent privacy.  More information about topcoding is available in the NLSY97 User's Guide.


/******************* SECTION 1:  GROSS HOUSEHOLD INCOME *********************/

/** In income section, I flag three items involving most of the respondents:

 

I. nonfarm employment income -- flag1400

II. father's income -- flag8700

III. mother's income -- flag9200

 

flag=0 indicating accurate income reported

flag=1 indicating estimated income reported    **/

 

/*Create the following components of the hh net worth and gross income, such as income from wages and salaries, interests, etc.  **/

 

/** Income from non-farm employment (nfarmwgY) **/

nfarmwgY=-4; flag1400=0;

if (YI_1400=1 and (YI_1700 ne -1 and YI_1700 ne -2 and YI_1700 ne -3)) or (YI_1400=-1 and YI_1600=1 and (YI_1700 ne -1 and YI_1700 ne -2 and YI_1700 ne -3)) or (YI_1400=-2 and YI_1500=1 and (YI_1700 ne -1 and YI_1700 ne -2 and YI_1700 ne -3)) or (YI_1400=-2 and YI_1500=-1 and YI_1600=1 and (YI_1700 ne -1 and YI_1700 ne -2 and YI_1700 ne -3))

then nfarmwgY=YI_1700;

if (YI_1400=1 or (YI_1400=-1 and YI_1600=1) or (YI_1400=-2 and YI_1500=1) or (YI_1400=-2 and YI_1500=-1 and YI_1600=1) or (YI_1400=-2 and YI_1500=-3 and YI_1600=1) or (YI_1400=-3 and YI_1600=1) or (YI_1400=-3 and YI_1500=1)) and (YI_1700 eq -1 or YI_1700 eq -2 or YI_1700 eq -3) then do;

    if YI_1800=1 then do; nfarmwgY=2500; flag1400=1; end;

    if YI_1800=2 then do; nfarmwgY=7500; flag1400=1; end;

    if YI_1800=3 then do; nfarmwgY=17500; flag1400=1; end;

    if YI_1800=4 then do; nfarmwgY=37500; flag1400=1; end;

    if YI_1800=5 then do; nfarmwgY=75000; flag1400=1; end;

    if YI_1800=6 then do; nfarmwgY=175000; flag1400=1; end;

    if YI_1800=7 then do; nfarmwgY=250001; flag1400=1; end;

end;

if YI_1400=0 or YI_1500=0 or YI_1600=0 then nfarmwgY=0;

if YI_1600=-1 or YI_1800=-1 then nfarmwgY=-1;

if YI_1500=-2 or YI_1800=-2 then nfarmwgY=-2;

if YI_1600=-3 or YI_1500=-3 or YI_1800=-3 then nfarmwgY=-3;

 

/** For all the questions below, the youth must be INDEPENDENT (YI_1900=1)   **/

 

/** Income from farm and self-employment (farmwgY)       **/

farmwgY=-4;

if YI_2000=1 and YI_2100 ne -1 and YI_2100 ne -2 and YI_2100 ne -3 then farmwgY=YI_2100;

if YI_2000=1 and (YI_2100 eq -1 or YI_2100 eq -2 or YI_2100 eq -3) then do;

   if YI_2200=1 then do; farmwgY=-2; end;

   if YI_2200=2 then do; farmwgY=2500; end;

   if YI_2200=3 then do; farmwgY=7500; end;

   if YI_2200=4 then do; farmwgY=17500; end;

   if YI_2200=5 then do; farmwgY=37500; end;

   if YI_2200=6 then do; farmwgY=75000; end;

   if YI_2200=7 then do; farmwgY=175000; end;

   if YI_2200=8 then do; farmwgY=250001; end;

end;

if YI_2000=0 then farmwgY=0;

if YI_2000=-1 or YI_2200=-1 then farmwgY=-1;

if YI_2000=-2 or YI_2200=-2 then farmwgY=-2;

if YI_2000=-3 or YI_2200=-3 then farmwgY=-3;

 

/** Non-farm income from the spouse/partner (nfarmwgP and farmwgP) **/

nfarmwgP=-4;

if YI_2300=1 then do;

   if (YI_2400=1 and YI_2600 ne -1 and YI_2600 ne -2 and YI_2600 ne -3) or (YI_2400=-1 and YI_2500=1 and YI_2600 ne -1 and YI_2600 ne -2 and YI_2600 ne -3)

   then nfarmwgP=YI_2600;

   if (YI_2400=1 and (YI_2600 eq -1 or YI_2600 eq -2 or YI_2600 eq -3)) or (YI_2400=-1 and YI_2500=1 and (YI_2600 eq -1 or YI_2600 eq -2 or YI_2600 eq -3)) then do;

      if YI_2700=1 then do; nfarmwgP=2500; end;

      if YI_2700=2 then do; nfarmwgP=7500; end;

      if YI_2700=3 then do; nfarmwgP=17500; end;

      if YI_2700=4 then do; nfarmwgP=37500; end;

      if YI_2700=5 then do; nfarmwgP=75000; end;

      if YI_2700=6 then do; nfarmwgP=175000; end;

      if YI_2700=7 then do; nfarmwgP=250001; end;

   end;

end;

if YI_2300=0 or YI_2400=0 or YI_2500=0 then nfarmwgP=0;

if YI_2300=-1 or YI_2500=-1 or YI_2700=-1 then nfarmwgP=-1;

if YI_2300=-2 or YI_2400=-2 or YI_2500=-2 or YI_2700=-2 then nfarmwgP=-2;

if YI_2300=-3 or YI_2400=-3 or YI_2500=-3 or YI_2700=-3 then nfarmwgP=-3;

 

/** Farm-related income from the spouse/partner          **/

farmwgP=-4;

if YI_2300=1 then do;

   if YI_2900=1 and YI_3000 ne -1 and YI_3000 ne -2 and YI_3000 ne -3 then farmwgP=YI_3000;

   if YI_2900=1 and (YI_3000 eq -1 or YI_3000 eq -2 or YI_3000 eq -3) then do;

      if YI_3100=1 then do; farmwgP=-2; end;

      if YI_3100=2 then do; farmwgP=2500; end;

      if YI_3100=3 then do; farmwgP=7500; end;

      if YI_3100=4 then do; farmwgP=17500; end;

      if YI_3100=5 then do; farmwgP=37500; end;

      if YI_3100=6 then do; farmwgP=75000; end;

      if YI_3100=7 then do; farmwgP=175000; end;

      if YI_3100=8 then do; farmwgP=250001; end;

   end;

end;

if YI_2300=0  or YI_2900=0      then farmwgP=0;

if YI_2300=-1 or YI_2900=-1 or YI_3100=-1 then farmwgP=-1;

if YI_2300=-2 or YI_2900=-2 or YI_3100=-2 then farmwgP=-2;

if YI_2300=-3 or YI_2900=-3 or YI_3100=-3 then farmwgP=-3;

 

/** Child support payment (childsuY) **/

childsuY=-4;

if YI_3300=1 then do;

   if (YI_3900=1 and YI_4000=1 and (YI_4100 ne -1 and YI_4100 ne -2 and YI_4100 ne -3)) then childsuY=YI_4100;

   if (YI_3900=1 and YI_4000=1 and (YI_4100 eq -1 or YI_4100 eq -2 or YI_4100 eq -3)) then do;

      if YI_4200=1 then do; childsuY=500; end;

      if YI_4200=2 then do; childsuY=1750; end;

      if YI_4200=3 then do; childsuY=3750; end;

      if YI_4200=4 then do; childsuY=7500; end;

      if YI_4200=5 then do; childsuY=17500; end;

      if YI_4200=6 then do; childsuY=37500; end;

      if YI_4200=7 then do; childsuY=50001; end;

   end;

end;

if YI_3300=0 or YI_3900=0 or YI_4000=0 then childsuY=0;

if YI_3300=-1 or YI_3900=-1 or YI_4000=-1 or YI_4200=-1 then childsuY=-1;

if YI_3300=-2 or YI_3900=-2 or YI_4000=-2 or YI_4200=-2 then childsuY=-2;

if YI_3300=-1 or YI_3900=-1 or YI_4000=-3 or yI_4100=-3 or YI_4200=-3 then childsuY=-3;

 

/** Interest payments received by the youth (Y) and his/her partner/spouse.  **/

interesY=-4;

if YI_4300=1 then do;

   if (YI_4400 ne -1 and YI_4400 ne -2 and YI_4400 ne -3) then interesY=YI_4400;

   if (YI_4400 eq -1 or YI_4400 eq -2 or YI_4400 eq -3) then do;

      if YI_4500=1 then do; interesY=250; end;

      if YI_4500=2 then do; interesY=750; end;

      if YI_4500=3 then do; interesY=1750; end;

      if YI_4500=4 then do; interesY=3750; end;

      if YI_4500=5 then do; interesY=6250; end;

      if YI_4500=6 then do; interesY=8750; end;

      if YI_4500=7 then do; interesY=10001; end;

   end;

end;

if YI_4300=0 then interesY=0;

if YI_4300=-1 or YI_4500=-1 then interesY=-1;

if YI_4300=-2 or YI_4500=-2 then interesY=-2;

if YI_4300=-3 or YI_4400=-3 or YI_4500=-3 then interesY=-3;

 

/** Dividends from stocks and mutual funds.    **/

dividend=-4;

if YI_4600=1 then do;

   if (YI_4700 ne -1 and YI_4700 ne -2 and YI_4700 ne -3) then dividend=YI_4700;

   if (YI_4700 eq -1 or YI_4700 eq -2 or YI_4700 eq -3) then do;

      if YI_4800=1 then do; dividend=250; end;

      if YI_4800=2 then do; dividend=750; end;

      if YI_4800=3 then do; dividend=1750; end;

      if YI_4800=4 then do; dividend=3750; end;

      if YI_4800=5 then do; dividend=6250; end;

      if YI_4800=6 then do; dividend=8750; end;

      if YI_4800=7 then do; dividend=10001; end;

   end;

end;

if YI_4600=0 then dividend=0;

if YI_4600=-1 or YI_4800=-1 then dividend=-1;

if YI_4600=-2 or YI_4800=-2 then dividend=-2;

if YI_4600=-3 or YI_4700=-3 or YI_4800=-3 then dividend=-3;

 

/** Rental income.         **/

rentalIY=-4;

if YI_4900=1 then do;

   if (YI_5000 ne -1 and YI_5000 ne -2 and YI_5000 ne -3) then rentalIY=YI_5000;

   if (YI_5000 eq -1 or YI_5000 eq -2 or YI_5000 eq -3) then do;

      if YI_5100=1 then do; rentalIY=500; end;

      if YI_5100=2 then do; rentalIY=1750; end;

      if YI_5100=3 then do; rentalIY=3750; end;

      if YI_5100=4 then do; rentalIY=7500; end;

      if YI_5100=5 then do; rentalIY=17500; end;

      if YI_5100=6 then do; rentalIY=37500; end;

       if YI_5100=7 then do; rentalIY=50001; end;

   end;

end;

if YI_4900=0 then rentalIY=0;

if YI_4900=-1 or YI_5100=-1 then rentalIY=-1;

if YI_4900=-2 or YI_5100=-2 then rentalIY=-2;

if YI_4900=-3 or YI_5000=-3 or YI_5100=-3 then rentalIY=-3;

 

/** Property or money from estates, trusts, annuities or inheritances.       **/

estatesY=-4;

if YI_5200=1 then do;

   if (YI_5300 ne -1 and YI_5300 ne -2 and YI_5300 ne -3) then estatesY=YI_5300;

   if (YI_5300 eq -1 or YI_5300 eq -2 or YI_5300 eq -3) then do;

      if YI_5400=1 then do; estatesY=2500; end;

      if YI_5400=2 then do; estatesY=7500; end;

      if YI_5400=3 then do; estatesY=17500; end;

      if YI_5400=4 then do; estatesY=37500; end;

      if YI_5400=5 then do; estatesY=75000; end;

      if YI_5400=6 then do; estatesY=175000; end;

      if YI_5400=7 then do; estatesY=250001; end;

   end;

end;

if YI_5200=0 then estatesY=0;

if YI_5200=-1 or YI_5400=-1 then estatesY=-1;

if YI_5200=-2 or YI_5400=-2 then estatesY=-2;

if YI_5200=-3 or YI_5300=-3 or YI_5400=-3 then estatesY=-3;

 

/** Income from other sources: SS payments, pension and retirement income, alimony, payments from insurance policies, etc...       **/

pensionY=-4;

if YI_7600=1 then do;

   if (YI_7700 ne -1 and YI_7700 ne -2 and YI_7700 ne -3) then pensionY=YI_7700;

   if (YI_7700 eq -1 or YI_7700 eq -2 or YI_7700 eq -3) then do;

      if YI_7800=1 then do; pensionY=500; end;

      if YI_7800=2 then do; pensionY=1750; end;

      if YI_7800=3 then do; pensionY=3750; end;

      if YI_7800=4 then do; pensionY=7500; end;

      if YI_7800=5 then do; pensionY=17500; end;

      if YI_7800=6 then do; pensionY=37500; end;

      if YI_7800=7 then do; pensionY=50001; end;

   end;

end;

if YI_7600=0 then pensionY=0;

if YI_7600=-1 or YI_7800=-1 then pensionY=-1;

if YI_7600=-2 or YI_7800=-2 then pensionY=-2;

if YI_7600=-3 or YI_7700=-3 or YI_7800=-3 then pensionY=-3;

 

/** If the youth lived with the father, the father's income.       **/

flag8700=0; faincome=-4;

/** identifying the father is in the household.          **/

if (HIRELY01=4 or HIRELY02=4 or HIRELY03=4 or HIRELY04=4 or HIRELY05=4 or HIRELY06=4 or HIRELY07=4 or HIRELY08=4 or HIRELY09=4 or HIRELY10=4 or HIRELY11=4 or HIRELY12=4 or HIRELY13=4 or HIRELY14=4) then do;

    if YI_8700=1 then do;

       if (YI_8800 ne -1 and YI_8800 ne -2 and YI_8800 ne -3) then faincome=YI_8800;

       if (YI_8800 eq -1 or YI_8800 eq -2 or YI_8800 eq -3) then do;

          if YI_8900=1 then do; faincome=2500; flag8700=1; end;

          if YI_8900=2 then do; faincome=7500; flag8700=1; end;

          if YI_8900=3 then do; faincome=17500; flag8700=1; end;

          if YI_8900=4 then do; faincome=37500; flag8700=1; end;

          if YI_8900=5 then do; faincome=75000; flag8700=1; end;

          if YI_8900=6 then do; faincome=175000; flag8700=1; end;

          if YI_8900=7 then do; faincome=250001; flag8700=1; end;

       end;

    end;

    if YI_8700=0 then faincome=0;

    if YI_8700=-1 or YI_8900=-1 then faincome=-1;

    if YI_8700=-2 or YI_8900=-2 then faincome=-2;

    if YI_8700=-3 or YI_8800=-3 or YI_8900=-3 then faincome=-3;

end;

 

/** If the youth lived with the mother, the mother's income.       **/

flag9200=0;

maincome=-4;

/** identify the mother is in the household.   **/

if (HIRELY01=3 or HIRELY02=3 or HIRELY03=3 or HIRELY04=3 or HIRELY05=3 or HIRELY06=3 or HIRELY07=3 or HIRELY08=3 or HIRELY09=3 or HIRELY10=3 or HIRELY11=3 or HIRELY12=3 or HIRELY13=3 or HIRELY14=3) then do;

    if YI_9200=1 then do;

       if (YI_9300 ne -1 and YI_9300 ne -2 and YI_9300 ne -3) then maincome=YI_9300;

       if (YI_9300 eq -1 or YI_9300 eq -2 or YI_9300 eq -3) then do;

          if YI_9400=1 then do;  maincome=2500; flag9200=1; end;

          if YI_9400=2 then do; maincome=7500; flag9200=1; end;

          if YI_9400=3 then do; maincome=17500; flag9200=1; end;

          if YI_9400=4 then do; maincome=37500; flag9200=1; end;

          if YI_9400=5 then do; maincome=75000; flag9200=1; end;

          if YI_9400=6 then do; maincome=175000; flag9200=1; end;

          if YI_9400=7 then do; maincome=250001; flag9200=1; end;

       end;

   end;

   if YI_9200=0 then maincome=0;

   if YI_9200=-1 or YI_9400=-1 then maincome=-1;

   if YI_9200=-2 or YI_9400=-2 then maincome=-2;

   if YI_9200=-3 or YI_9400=-3 then maincome=-3;

end;

 

/** If the youth lives with the male guardian. **/

mgincome=-4;

if YI_9600=1 then do;

   if (YI_9700=1 and (YI_9800 ne -1 and YI_9800 ne -2 and YI_9800 ne -3)) then mgincome=YI_9800;

   if (YI_9700=1 and (YI_9800 eq -1 or YI_9800 eq -2 or YI_9800 eq -3)) then do;

       if YI_9900=1 then do; mgincome=2500; end;

       if YI_9900=2 then do; mgincome=7500; end;

       if YI_9900=3 then do; mgincome=17500; end;

       if YI_9900=4 then do; mgincome=37500; end;

       if YI_9900=5 then do; mgincome=75000; end;

       if YI_9900=6 then do; mgincome=175000; end;

       if YI_9900=7 then do; mgincome=250001; end;

    end;

end;

if YI_9700=0 then mgincome=0;

if YI_9600=-1 or YI_9700=-1 or YI_9900=-1 then mgincome=-1;

if YI_9600=-2 or YI_9700=-2 or YI_9900=-2 then mgincome=-2;

if YI_9600=-3 or YI_9700=-3 or YI_9800=-3 or YI_9900=-3 then mgincome=-3;

 

/** If the youth lives with female guardian.   **/

fgincome=-4;

if YI_10100=1 then do;

   if (YI_10200=1 and (YI_10300 ne -1 and YI_10300 ne -2 and YI_10300 ne -3)) then fgincome=YI_10300;

   if (YI_10100=1 and YI_10200=1 and (YI_10300 eq -1 or YI_10300 eq -2 or YI_10300 eq -3)) then do;

       if YI_10400=1 then do; fgincome=2500; end;

       if YI_10400=2 then do; fgincome=7500; end;

       if YI_10400=3 then do; fgincome=17500; end;

       if YI_10400=4 then do; fgincome=37500; end;

       if YI_10400=5 then do; fgincome=75000; end;

       if YI_10400=6 then do; fgincome=175000; end;

       if YI_10400=7 then do; fgincome=250001; end;

    end;

end;

if YI_10200=0 then fgincome=0;

if YI_10100=-1 or YI_10200=-1 or YI_10400=-1 then fgincome=-1;

if YI_10100=-2 or YI_10200=-2 or YI_10400=-2 then fgincome=-2;

if YI_10100=-3 or YI_10200=-3 or YI_10300=-3 or YI_10400=-3 then fgincome=-3;

 

/** Income from household members of 14 or older other than spouse/partner.  **/

array otfamI otfamI01-otfamI14;

array I11100 I1110001-I1110014;

array I11600 I1160001-I1160014;

array I11700 I1170001-I1170014;

do I=1 to 14;

   otfamI(I)=-4;

   if YI_10800=1 then do;

      if I11100(I)=0 and I11600(I) ne -1 and I11600(I) ne -2 and I11600(I) ne -3 and I11600(I) ne -4 then otfamI(I)=I11600(I);

      if I11100(I)=0 and (I11600(I) eq -1 or I11600(I) eq -2 or I11600(I) eq -3) then do;

                 if I11700(I)=1 then do; otfamI(I)=2500; end;

                 if I11700(I)=2 then do; otfamI(I)=7500; end;

                 if I11700(I)=3 then do; otfamI(I)=17500; end;

                 if I11700(I)=4 then do; otfamI(I)=37500; end;

                 if I11700(I)=5 then do; otfamI(I)=75000; end;

                 if I11700(I)=6 then do; otfamI(I)=175000; end;

                 if I11700(I)=7 then do; otfamI(I)=250001; end;

      end;

      if I11100(I)=-1 or I11700(I)=-1 then otfamI(I)=-1;

      if I11100(I)=-2 or I11700(I)=-2 then otfamI(I)=-2;

      if I11100(I)=-3 or I11600(I)=-3 or I11700(I)=-3 then otfamI(I)=-3;

   end;

end;

 

/** We now create gross hh income according to the youth.          **/

groshhIY=0;

if YI_1900=1 then do;

   if nfarmwgY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+nfarmwgY;

   if farmwgY  NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+farmwgY;          

   if nfarmwgP NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+nfarmwgP;        

   if farmwgP  NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+farmwgP;          

   if childsuY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+childsuY;           

   if interesY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+interesY;            

   if dividend NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+dividend;          

   if rentalIY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+rentalIY;            

   if estatesY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+estatesY;             

   if pensionY NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+pensionY;

   if faincome NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+faincome;          

   if maincome NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+maincome;        

   if mgincome NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+mgincome;        

   if fgincome NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+fgincome;          

   if prgamt   NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+prgamt;

   do I=1 to 14;

      if otfamI[I] NOT in (-1,-2,-3,-4) then groshhIY=groshhIY+otfamI[I];          

   end;

end;

 

if YI_1900=-1 or YI_8500=-1 or (nfarmwgY=-1 or farmwgY=-1 or nfarmwgP=-1 or farmwgP=-1  or childsuY=-1 or interesY=-1 or dividend=-1 or rentalIY=-1 or estatesY=-1 or pensionY=-1 or faincome=-1 or maincome=-1 or mgincome=-1 or fgincome=-1 or prgamt=-1 or otfamI01=-1 or otfamI02=-1 or otfamI03=-1 or otfamI04=-1 or otfamI05=-1 or otfamI06=-1 or otfamI07=-1 or otfamI08=-1 or otfamI09=-1 or otfamI10=-1 or otfamI11=-1 or otfamI12=-1 or otfamI13=-1 or otfamI14=-1) then do;

   groshhIY=-1;

   invskpGIY=1;

end;

 

if YI_1900=-2 or YI_8500=-2 or (nfarmwgY=-2 or farmwgY=-2  or nfarmwgP=-2 or farmwgP=-2  or childsuY=-2 or interesY=-2 or dividend=-2 or rentalIY=-2 or pensionY=-2 or estatesY=-2 or faincome=-2 or maincome=-2 or mgincome=-2 or fgincome=-2 or prgamt=-2 or otfamI01=-2 or otfamI02=-2 or otfamI03=-2 or otfamI04=-2 or otfamI05=-2 or otfamI06=-2 or otfamI07=-2 or otfamI08=-2 or otfamI09=-2 or otfamI10=-2 or otfamI11=-2 or otfamI12=-2 or otfamI13=-2 or otfamI14=-2) then do;

   groshhIY=-2;

   invskpGIY=2;

end;

 

if YI_1900=-3 or YI_8500=-3 or (nfarmwgY=-3 or farmwgY=-3 or nfarmwgP=-3 or farmwgP=-3 or childsuY=-3 or interesY=-3 or dividend=-3 or rentalIY=-3 or pensionY=-3 or estatesY=-3 or faincome=-3 or maincome=-3 or mgincome=-3 or fgincome=-3 or prgamt=-3 or otfamI01=-3 or otfamI02=-3 or otfamI03=-3 or otfamI04=-3 or otfamI05=-3 or otfamI06=-3 or otfamI07=-3 or otfamI08=-3 or otfamI09=-3 or otfamI10=-3 or otfamI11=-3 or otfamI12=-3 or otfamI13=-3 or otfamI14=-3) then do;

   groshhIY=-3;

   invskpGIY=3;

end;

 

if YI_1900=0 or YI_1900=-4  then do; groshhIY=-4; vskpGIY=1; end;

 

/** give the people who were not interviewed in round 5 value -5.  **/

if YAS50=-5 then do; groshhIY=-5; nonintGIY=1; end;

 


/***************** SECTION 2:  HOUSEHOLD NET WORTH ****************/

/** In asset section, I flag top three items involved the most respondents:

    I. savings -- flag4400

    II. present value of vehicles owned -- flag4790  III. money still owed on these vehicles   -- flag4840

    flag=0 indicating accurate income reported flag=1 indicating estimated income reported.      **/

 

/** If the youth OWNS some land, ITS PRESENT VLAUE.      **/

pvranch=0;

if YAS1400=1 then do;

/** If the youth reported owning all of it.    **/

   if YAS1610=1 or YAS1610=2 then do;

      if YAS1860=1 then pvranch=YAS1862;

      if YAS1860=2 then pvranch=YAS1864L+(YAS1864U-YAS1864L)/2;

      if ((YAS1860 ne 1 and YAS1860 ne 2) or (YAS1862=-1 or YAS1862=-2)) then do;

         if YAS1866=1 then do; pvranch=12500; end;

         if YAS1866=2 then do; pvranch=37500; end;

         if YAS1866=3 then do; pvranch=75000; end;

         if YAS1866=4 then do; pvranch=175000; end;

         if YAS1866=5 then do; pvranch=375000; end;

         if YAS1866=6 then do; pvranch=750000; end;

         if YAS1866=7 then do; pvranch=1000001; end;

      end;

   end;

/** If the youth reported owning only part of it         **/

   if (YAS1610=3 or YAS1610=4) and YAS2120=100 then do;

      if YAS2140=1 then pvranch=YAS2142;

      if YAS2140=2 then pvranch=(YAS2144L+(YAS2144U-YAS2144L)/2);

      if ((YAS2140 ne 1 and YAS2140 ne 2) or (YAS2142=-1 or YAS2142=-2)) then do;

         if YAS2146=1 then do; pvranch=12500; end;

         if YAS2146=2 then do; pvranch=37500; end;

         if YAS2146=3 then do; pvranch=75000; end;

         if YAS2146=4 then do; pvranch=175000; end;

         if YAS2146=5 then do; pvranch=375000; end;

         if YAS2146=6 then do; pvranch=750000; end;

         if YAS2146=7 then do; pvranch=1000001; end;

      end;

   end;

   if (YAS1610=3 or YAS1610=4) and YAS2120 ne 100 then do;

      if YAS2170=1 then pvranch=YAS2172;

      if YAS2170=2 then pvranch=(YAS2174L+(YAS2174U-YAS2174L)/2);

      if ((YAS2170 ne 1 and YAS2170 ne 2) or (YAS2172=-1 or YAS2172=-2)) then do;

         if YAS2176=1 then do; pvranch=12500; end;

         if YAS2176=2 then do; pvranch=37500; end;

         if YAS2176=3 then do; pvranch=75000; end;

         if YAS2176=4 then do; pvranch=175000; end;

         if YAS2176=5 then do; pvranch=375000; end;

         if YAS2176=6 then do; pvranch=750000; end;

         if YAS2176=7 then do; pvranch=1000001; end;

      end;

   end;

end;

if YAS1400=-1 or YAS1610=-1 or YAS1864L=-1 or YAS1864U=-1 or YAS1866=-1 or YAS2144L=-1 or YAS2144U=-1 or YAS2146=-1 or YAS2174L=-1 or YAS2174U=-1 or YAS2176=-1

then pvranch=-1;

if YAS1400=-2 or YAS1610=-2 or YAS1864L=-2 or YAS1864U=-2 or YAS1866=-2 or YAS2144L=-2 or YAS2144U=-2 or YAS2146=-2 or YAS2174L=-2 or YAS2174U=-2 or YAS2176=-2

then pvranch=-2;

if YAS1400=-3 or YAS1610=-3 or YAS1864L=-3 or YAS1864U=-3 or YAS1866=-3 or YAS2144L=-3 or YAS2144U=-3 or YAS2146=-3 or YAS2174L=-3 or YAS2174U=-3 or YAS2176=-3

then pvranch=-3;

 

/** If the youth OWNS the mobile home and the site, ITS PRESENT VALUE.      **/

pvmbst=0;

if YAS1500=1 then do;

   if (YAS2520=1 or YAS2520=2) and YAS2550=1 then pvmbst=YAS2552;

   if (YAS2520=1 or YAS2520=2) and YAS2550=2 then pvmbst=YAS2554L+(YAS2554U-YAS2554L)/2;

   if (YAS2520=1 or YAS2520=2) and ((YAS2550 ne 1 and YAS2550 ne 2) or (YAS2552=-1 or YAS2552=-2)) then do;

      if YAS2556=1 then do; pvmbst=500; end;

      if YAS2556=2 then do; pvmbst=1750; end;

      if YAS2556=3 then do; pvmbst=3750; end;

      if YAS2556=4 then do; pvmbst=7500; end;

      if YAS2556=5 then do; pvmbst=17500; end;

      if YAS2556=6 then do; pvmbst=37500; end;

      if YAS2556=7 then do; pvmbst=50001; end;

   end;

end;

if YAS1500=-1 or YAS2520=-1 or YAS2554L=-1 or YAS2554U=-1 or YAS2556=-1 then pvmbst=-1;

if YAS1500=-2 or YAS2520=-2 or YAS2554L=-2 or YAS2554U=-2 or YAS2556=-2 then pvmbst=-2;

if YAS1500=-3 or YAS2520=-3 or YAS2552=-3 or YAS2554L=-3 or YAS2554U=-3 or YAS2556=-3 then pvmbst=-3;

 

/** If the youth owns only the mobile home, IT'S PRESENT VALUE.    **/

pvmb=0;

if YAS1500=1 then do;

   if (YAS2520=3 or YAS2520=4) and YAS2760=1 then pvmb=YAS2762;

   if (YAS2520=3 or YAS2520=4) and YAS2760=2 then pvmb=(YAS2764L+(YAS2764U-YAS2764L)/2);

   if (YAS2520=3 or YAS2520=4) and ((YAS2760 ne 1 and YAS2760 ne 2) or (YAS2762=-1 or YAS2762=-2)) then do;

      if YAS2766=1 then do; pvmb=12500; end;

      if YAS2766=2 then do; pvmb=37500; end;

      if YAS2766=3 then do; pvmb=75000; end;

      if YAS2766=4 then do; pvmb=175000; end;

      if YAS2766=5 then do; pvmb=375000; end;

      if YAS2766=6 then do; pvmb=750000; end;

      if YAS2766=7 then do; pvmb=1000001; end;

   end;

end;

if YAS1500=-1 or YAS2520=-1 or YAS2764L=-1 or YAS2764U=-1 or YAS2766=-1 then pvmb=-1;

if YAS1500=-2 or YAS2520=-2 or YAS2764L=-2 or YAS2764U=-2 or YAS2766=-2 then pvmb=-2;

if YAS1500=-3 or YAS2520=-3 or YAS2762=-3 or YAS2764L=-3 or YAS2764U=-3 or YAS2766=-3 then pvmb=-3;

 

/** If the youth owns only the mobile home site, ITS PRESENT VALUE.          **/

pvst=0;

if YAS1500=1 then do;

   if (YAS2520=5 or YAS2520=6) and YAS3010=1 then pvst=YAS3012;

   if (YAS2520=5 or YAS2520=6) and YAS3010=2 then pvst=(YAS3014L+(YAS3014U-YAS3014L)/2);

   if (YAS2520=5 or YAS2520=6) and ((YAS3010 ne 1 and YAS3010 ne 2) or (YAS3012=-1 or YAS3012=-2)) then do;

      if YAS3016=1 then do; pvst=12500; end;

      if YAS3016=2 then do; pvst=57500; end;

      if YAS3016=3 then do;pvst=75000; end;

      if YAS3016=4 then do; pvst=175000; end;

      if YAS3016=5 then do; pvst=575000; end;

      if YAS3016=6 then do; pvst=750000; end;

      if YAS3016=7 then do; pvst=1000001; end;

   end;

end;

if YAS2520=-1 or YAS3014L=-1 or YAS3014U=-1 or YAS3016=-1 or YAS1500=-1 then pvst=-1;

if YAS2520=-2 or YAS3014L=-2 or YAS3014U=-2 or YAS3016=-2 or YAS1500=-2 then pvst=-2;

if YAS2520=-3 or YAS3012=-3 or YAS3014L=-3 or YAS3014U=-3 or YAS3016=-3 or YAS1500=-3 then pvst=-3;

 

/** If the respondent owns the apartment, its value.     **/

pvapthm=0;

if YAS3310=1 or YAS3310=2 then do;

   if YAS3380=1 then pvapthm=YAS3382;

   if YAS3380=2 then pvapthm=(YAS3384L+(YAS3384U-YAS3384L)/2);

   if ((YAS3380 ne 1 and YAS3380 ne 2) or (YAS3382=-1 or YAS3382=-2)) then do;

      if YAS3386=1 then do; pvapthm=500; end;

      if YAS3386=2 then do; pvapthm=1750; end;

      if YAS3386=3 then do; pvapthm=3750; end;

      if YAS3386=4 then do; pvapthm=7500; end;

      if YAS3386=5 then do; pvapthm=17500; end;

      if YAS3386=6 then do; pvapthm=37500; end;

      if YAS3386=7 then do; pvapthm=50001; end;

   end;

end;

if YAS3310=-1 or YAS3384L=-1 or YAS3384U=-1 or YAS3386=-1 then pvapthm=-1;

if YAS3310=-2 or YAS3384L=-2 or YAS3384U=-2 or YAS3386=-2 then pvapthm=-2;

if YAS3310=-3 or YAS3382=-3 or YAS3384L=-3 or YAS3384U=-3 or YAS3386=-3 then pvapthm=-3;

 

/** Mortgage or land contract on land or property.       **/

mortgagY=0;

if YAS3740=1 or YAS3740=2 then do;

   if YAS3750=1 and YAS3752 ge 0 then mortgagY=YAS3752;

   if YAS3750=2 and YAS3754U ge 0 and YAS3754L ge 0 then mortgagY=(YAS3754L+(YAS3754U-YAS3754L)/2);

   if ((YAS3750 ne 1 and YAS3750 ne 2) or (YAS3752=-1 or YAS3752=-2)) then do;

      if YAS3756=1 then do; mortgagY=500; end;

      if YAS3756=2 then do; mortgagY=1750; end;

      if YAS3756=3 then do; mortgagY=3750; end;

      if YAS3756=4 then do; mortgagY=7500; end;

      if YAS3756=5 then do; mortgagY=17500; end;

      if YAS3756=6 then do; mortgagY=37500; end;

      if YAS3756=7 then do; mortgagY=50001; end;

   end;

end;

if YAS3740=-1 or YAS3754L=-1 or YAS3754U=-1 or YAS3756=-1 then mortgagY=-1;

if YAS3740=-2 or YAS3754L=-2 or YAS3754U=-2 or YAS3756=-2 then mortgagY=-2;

if YAS3740=-3 or YAS3752=-3 or YAS3754L=-3 or YAS3754U=-3 or YAS3756=-3 then mortgagY=-3;

 

/** Loans from relatives or friends when respondent bought or remodeled the residence. **/

loanowed=0;

if YAS3790=1 then do;

   if YAS3810=1 and YAS3812 ge 0 then loanowed=YAS3812;

   if YAS3810=2 and YAS3814U ge 0 and YAS3814L ge 0 then loanowed=(YAS3814L+(YAS3814U-YAS3814L)/2);

   if ((YAS3810 ne 1 and YAS3810 ne 2) or (YAS3812=-1 or YAS3812=-2)) then do;

      if YAS3816=1 then do; loanowed=12500; end;

      if YAS3816=2 then do; loanowed=37500; end;

      if YAS3816=3 then do; loanowed=75000;  end;

      if YAS3816=4 then do; loanowed=175000; end;

      if YAS3816=5 then do; loanowed=375000; end;

      if YAS3816=6 then do; loanowed=750000; end;

      if YAS3816=7 then do; loanowed=1000001; end;

   end;

end;

if YAS3810=-1 or YAS3790=-1 or YAS3814L=-1 or YAS3814U=-1 or YAS3816=-1 then loanowed=-1;

if YAS3810=-2 or YAS3790=-2 or YAS3814L=-2 or YAS3814U=-2 or YAS3816=-2 then loanowed=-2;

if YAS3810=-3 or YAS3790=-3 or YAS3812=-3  or YAS3814L=-3 or YAS3814U=-3 or YAS3816=-3 then loanowed=-3;

 

/** Remaining loans from round 4 still unpaid, total amount owed   **/

stilowed=0;

if (YAS3840=1 and YAS3850=1) or YAS3860=1 then do;

   if YAS3880=1 and YAS3882 ge 0 then stilowed=YAS3882;

   if YAS3880=2 and YAS3884U ge 0 and YAS3884L ge 0 then stilowed=(YAS3884L+(YAS3884U-YAS3884L)/2);

   if ((YAS3880 ne 1 and YAS3880 ne 2) or (YAS3882=-1 or YAS3882=-2)) then do;

      if YAS3886=1 then do; stilowed=500; end;

      if YAS3886=2 then do; stilowed=1750; end;

      if YAS3886=3 then do; stilowed=3750; end;

      if YAS3886=4 then do; stilowed=7500; end;

      if YAS3886=5 then do; stilowed=17500; end;

      if YAS3886=6 then do; stilowed=37500; end;

      if YAS3886=7 then do;stilowed=50001; end;

   end;

end;

if YAS3860=-1 or YAS3884L=-1 or YAS3884U=-1 or YAS3886=-1 then stilowed=-1;

if YAS3860=-2 or YAS3884L=-2 or YAS3884U=-2 or YAS3886=-2 then stilowed=-2;

if YAS3860=-3 or YAS3882=-3 or YAS3884L=-3 or YAS3884U=-3 or YAS3886=-3 then stilowed=-3;

 

/** Second mortgages.      **/

secmortY=0;

if YAS3910=1 then do;

   if YAS3920=1 and YAS3922 ge 0 then secmortY=YAS3922;

   if YAS3920=2 and YAS3924U ge 0 and YAS3924L ge 0 then secmortY=(YAS3924L+(YAS3924U-YAS3924L)/2);

   if ((YAS3920 ne 1 and YAS3920 ne 2) or (YAS3922=-1 or YAS3922=-2)) then do;

      if YAS3926=1 then do; secmortY=500; end;

      if YAS3926=2 then do; secmortY=1750; end;

      if YAS3926=3 then do; secmortY=3750; end;

      if YAS3926=4 then do; secmortY=7500; end;

      if YAS3926=5 then do; secmortY=17500; end;

      if YAS3926=6 then do; secmortY=37500; end;

      if YAS3926=7 then do; secmortY=50001; end;

   end;

end;

if YAS3910=-1 or YAS3924L=-1 or YAS3924U=-1 or YAS3926=-1 then secmortY=-1;

if YAS3910=-2 or YAS3924L=-2 or YAS3924U=-2 or YAS3926=-2 then secmortY=-2;

if YAS3910=-3 or YAS3922=-3 or YAS3924L=-3 or YAS3924U=-3 or YAS3926=-3 then secmortY=-3;

 

/** Taxes on the property to be paid.          **/

proptaxY=0;

if YAS3950=1 then do;

   if YAS3960=1 and YAS3962 ge 0 then proptaxY=YAS3962;

   if YAS3960=2 and YAS3964U ge 0 and YAS3964L ge 0 then proptaxY=(YAS3964L+(YAS3964U-YAS3964L)/2);

   if ((YAS3960 ne 1 and YAS3960 ne 2) or (YAS3962=-1 or YAS3962=-2)) then do;

      if YAS3966=1 then do; proptaxY=500; end;

      if YAS3966=2 then do; proptaxY=1750; end;

      if YAS3966=3 then do; proptaxY=3750; end;

      if YAS3966=4 then do; proptaxY=7500; end;

      if YAS3966=5 then do; proptaxY=17500; end;

      if YAS3966=6 then do; proptaxY=37500; end;

      if YAS3966=7 then do; proptaxY=50001; end;

   end;

end;

if YAS3950=-1 or YAS3964L=-1 or YAS3964U=-1 or YAS3966=-1 then proptaxY=-1;

if YAS3950=-2 or YAS3964L=-2 or YAS3964U=-2 or YAS3966=-2 then proptaxY=-2;

if YAS3950=-3 or YAS3962=-3 or YAS3964L=-3 or YAS3964U=-3 or YAS3966=-3 then proptaxY=-3;

 

/** Own a business, partnership or professional practice.          **/

pvbuss=0;

if YAS4010=1 or YAS4010=2 then do;

   if YAS4030=1 then pvbuss=YAS4032;

   if YAS4030=2 then pvbuss=(YAS4034L+(YAS4034U-YAS4034L)/2);

   if ((YAS4030 ne 1 and YAS4030 ne 2) or (YAS4032=-1 or YAS4032=-2)) then do;

      if YAS4036=1 then do; pvbuss=12500; end;

      if YAS4036=2 then do; pvbuss=37500; end;

      if YAS4036=3 then do; pvbuss=75000; end;

      if YAS4036=4 then do; pvbuss=175000; end;

      if YAS4036=5 then do; pvbuss=375000; end;

      if YAS4036=6 then do; pvbuss=750000; end;

      if YAS4036=7 then do; pvbuss=1000001; end;

   end;

end;

if YAS4010=-1 or YAS4034L=-1 or YAS4034U=-1 or YAS4036=-1 then pvbuss=-1;

if YAS4010=-2 or YAS4034L=-2 or YAS4034U=-2 or YAS4036=-2 then pvbuss=-2;

if YAS4010=-3 or YAS4032=-3 or YAS4034L=-3 or YAS4034U=-3 or YAS4036=-3 then pvbuss=-3;

 

/** Second real estate owned.        **/

secrestY=0;

if YAS4140=1 or YAS4140=2 then do;

   if YAS4160=1 then secrestY=YAS4162;

   if YAS4160=2 then secrestY=(YAS4164L+(YAS4164U-YAS4164L)/2);

   if ((YAS4160 ne 1 and YAS4160 ne 2) or (YAS4162=-1 or YAS4162=-2)) then do;

      if YAS4166=1 then do; secrestY=12500; end;

      if YAS4166=2 then do; secrestY=37500; end;

      if YAS4166=3 then do; secrestY=75000; end;

      if YAS4166=4 then do; secrestY=175000; end;

      if YAS4166=5 then do; secrestY=375000; end;

      if YAS4166=6 then do; secrestY=750000; end;

      if YAS4166=7 then do; secrestY=1000001; end;

   end;

end;

if YAS4140=-1 or YAS4164L=-1 or YAS4164U=-1 or YAS4166=-1 then secrestY=-1;

if YAS4140=-2 or YAS4164L=-2 or YAS4164U=-2 or YAS4166=-2 then secrestY=-2;

if YAS4140=-3 or YAS4162=-3 or YAS4164L=-3 or YAS4164U=-3 or YAS4166=-3 then secrestY=-3;

 

/* Retirement plans or pensions */

retireY=0;

if YAS4270=1 or YAS4270=2 or YAS4270=3 then do;

   if YAS4290=1 and YAS4292 ge 0 then retireY=YAS4292;

   if YAS4290=2 and YAS4294U ge 0 and YAS4294L ge 0 then retireY=(YAS4294L+(YAS4294U-YAS4294L)/2);

   if ((YAS4290 ne 1 and YAS4290 ne 2) or (YAS4292=-1 or YAS4292=-2)) then do;

      if YAS4296=1 then do; retireY=2500; end;

      if YAS4296=2 then do; retireY=7500; end;

      if YAS4296=3 then do; retireY=17500; end;

      if YAS4296=4 then do; retireY=37500; end;

      if YAS4296=5 then do; retireY=75000; end;

      if YAS4296=6 then do; retireY=175000; end;

      if YAS4296=7 then do; retireY=250001; end;

   end;

end;

if YAS4270=-1 or YAS4294L=-1 or YAS4294U=-1 or YAS4296=-1 then retireY=-1;

if YAS4270=-2 or YAS4294L=-2 or YAS4294U=-2 or YAS4296=-2 then retireY=-2;

if YAS4270=-3 or YAS4292=-3 or YAS4294L=-3 or YAS4294U=-3 or YAS4296=-3 then retireY=-3;

 

/** Savings in saving accounts, money market, funds, trusts,...    **/

savingsY=0; flag4400=0;

if YAS4400=1 or YAS4400=2 or YAS4400=3 then do;

   if YAS4420=1 and YAS4422 ge 0 then savingsY=YAS4422;

   if YAS4420=2 and YAS4424U ge 0 and YAS4424L ge 0 then savingsY=(YAS4424L+(YAS4424U-YAS4424L)/2);

   if ((YAS4420 ne 1 and YAS4420 ne 2) or (YAS4422=-1 or YAS4422=-2)) then do;

      if YAS4426=1 then do; savingsY=500; flag4400=1; end;

      if YAS4426=2 then do; savingsY=1750; flag4400=1; end;

      if YAS4426=3 then do; savingsY=3750; flag4400=1; end;

      if YAS4426=4 then do; savingsY=7500; flag4400=1; end;

      if YAS4426=5 then do; savingsY=17500; flag4400=1; end;

      if YAS4426=6 then do; savingsY=37500; flag4400=1; end;

      if YAS4426=7 then do; savingsY=50001; flag4400=1; end;

   end;

end;

if YAS4400=-1 or YAS4424L=-1 or YAS4424U=-2 or YAS4426=-1 then savingsY=-1;

if YAS4400=-2 or YAS4424L=-2 or YAS4424U=-2 or YAS4426=-2 then savingsY=-2;

if YAS4400=-3 or YAS4422=-3 or YAS4424L=-3 or YAS4424U=-3 or YAS4426=-3 then savingsY=-3;

 

/** Other savings in bonds or CDs.   **/

othsavY=0;

if YAS4530=1 or YAS4530=2 or YAS4530=3 then do;

   if YAS4550=1 and YAS4552 ge 0 then othsavY=YAS4552;

   if YAS4550=2 and YAS4554U ge 0 and YAS4554L ge 0 then othsavY=(YAS4554L+(YAS4554U-YAS4554L)/2);

   if ((YAS4550 ne 1 and YAS4550 ne 2) or (YAS4552=-1 or YAS4552=-2)) then do;

      if YAS4556=1 then do; othsavY=500; end;

      if YAS4556=2 then do; othsavY=1750; end;

      if YAS4556=3 then do; othsavY=3750; end;

      if YAS4556=4 then do; othsavY=7500; end;

      if YAS4556=5 then do; othsavY=17500; end;

      if YAS4556=6 then do; othsavY=37500; end;

      if YAS4556=7 then do; othsavY=50001; end;

   end;

end;

if YAS4530=-1 or YAS4554L=-1 or YAS4554U=-1 or YAS4556=-1 then othsavY=-1;

if YAS4530=-2 or YAS4554L=-2 or YAS4554U=-2 or YAS4556=-2 then othsavY=-2;

if YAS4530=-3 or YAS4552=-3 or YAS4554L=-3 or YAS4554U=-3 or YAS4556=-3 then othsavY=-3;

 

/** Stocks, mutual funds.  **/

stockY=0;

if YAS4660=1 or YAS4660=2 or YAS4660=3 then do;

   if YAS4680=1 then stockY=YAS4682;

   if YAS4680=2 then stockY=(YAS4684L+(YAS4684U-YAS4684L)/2);

   if ((YAS4680 ne 1 and YAS4680 ne 2) or (YAS4682=-1 or YAS4682=-2)) then do;

      if YAS4686=1 then do; stockY=500; end;

      if YAS4686=2 then do; stockY=1750; end;

      if YAS4686=3 then do; stockY=3750; end;

      if YAS4686=4 then do; stockY=7500; end;

      if YAS4686=5 then do; stockY=17500; end;

      if YAS4686=6 then do; stockY=37500; end;

      if YAS4686=7 then do; stockY=50001; end;

   end;

end;

if YAS4660=-1     or YAS4684L=-1 or YAS4684U=-1 or YAS4686=-1 then stockY=-1;

if YAS4660=-2     or YAS4684L=-2 or YAS4684U=-2 or YAS4686=-2 then stockY=-2;

if YAS4660=-3 or YAS4682=-3 or YAS4684L=-3 or YAS4684U=-3 or YAS4686=-3 then stockY=-3;

 

/** Present value of vehicles owned. **/

pvcarsY=0;

flag4790=0;

if YAS4790=1 or YAS4790=2 or YAS4790=3 then do;

   if YAS4810=1 then pvcarsY=YAS4812;

   if YAS4810=2 then pvcarsY=(YAS4814L+(YAS4814U-YAS4814L)/2);

   if ((YAS4810 ne 1 and YAS4810 ne 2) or (YAS4812=-1 or YAS4812=-2)) then do;

      if YAS4816=1 then do; pvcarsY=2500; flag4790=1; end;

      if YAS4816=2 then do; pvcarsY=7500; flag4790=1; end;

      if YAS4816=3 then do; pvcarsY=17500; flag4790=1;end;

      if YAS4816=4 then do; pvcarsY=37500; flag4790=1; end;

      if YAS4816=5 then do; pvcarsY=75000; flag4790=1; end;

      if YAS4816=6 then do; pvcarsY=175000; flag4790=1; end;

      if YAS4816=7 then do; pvcarsY=250001; flag4790=1; end;

   end;

end;

if YAS4790=-1     or YAS4814L=-1 or YAS4814U=-1 or YAS4816=-1 then pvcarsY=-1;

if YAS4790=-2     or YAS4814L=-2 or YAS4814U=-2 or YAS4816=-2 then pvcarsY=-2;

if YAS4790=-3 or YAS4812=-3 or YAS4814L=-3 or YAS4814U=-3 or YAS4816=-3 then pvcarsY=-3;

 

/** Money still owed on these vehicles.        **/

cardebt=0;

flag4840=0;

if YAS4840=1 then cardebt=YAS4842;

if YAS4840=2 then cardebt=(YAS4844L+(YAS4844U-YAS4844L)/2);

if ((YAS4840 ne 1 and YAS4840 ne 2) or (YAS4842=-1 or YAS4842=-2)) then do;

   if YAS4846=1 then do; cardebt=2500; flag4840=1; end;

   if YAS4846=2 then do; cardebt=7500; flag4840=1; end;

   if YAS4846=3 then do; cardebt=17500; flag4840=1; end;

   if YAS4846=4 then do; cardebt=37500; flag4840=1; end;

   if YAS4846=5 then do; cardebt=75000; flag4840=1; end;

   if YAS4846=6 then do; cardebt=175000; flag4840=1; end;

   if YAS4846=7 then do; cardebt=250001; flag4840=1; end;

end;

if YAS4790=-1     or YAS4844L=-1 or YAS4844U=-1 or YAS4846=-1 then cardebt=-1;

if YAS4790=-2     or YAS4844L=-2 or YAS4844U=-2 or YAS4846=-2 then cardebt=-2;

if YAS4790=-3 or YAS4842=-3 or YAS4844L=-3 or YAS4844U=-3 or YAS4846=-3 then cardebt=-3;

 

/** Present value of owned furniture **/

pvfurntY=0;

if YAS4870=1 then do; pvfurntY=2500; end;

if YAS4870=2 then do; pvfurntY=7500; end;

if YAS4870=3 then do; pvfurntY=17500; end;

if YAS4870=4 then do; pvfurntY=37500; end;

if YAS4870=5 then do; pvfurntY=75000; end;

if YAS4870=6 then do; pvfurntY=175000; end;

if YAS4870=7 then do; pvfurntY=250001; end;

if YAS4870=-1 then pvfurntY=-1;

if YAS4870=-2 then pvfurntY=-2;

if YAS4870=-3 then pvfurntY=-3;

 

/** Other assets not being mentioned before.   **/

otassetY=0;

if YAS4880=1 or YAS4880=2 or YAS4880=3 then do;

   if YAS4900=1 then otassetY=YAS4902;

   if YAS4900=2 then otassetY=(YAS4904L+(YAS4904U-YAS4904L)/2);

   if ((YAS4900 ne 1 and YAS4900 ne 2) or (YAS4902=-1 or YAS4902=-2)) then do;

       if YAS4906=1 then do; otassetY=2500; end;

       if YAS4906=2 then do; otassetY=7500; end;

       if YAS4906=3 then do; otassetY=17500; end;

       if YAS4906=4 then do; otassetY=37500; end;

       if YAS4906=5 then do; otassetY=75000; end;

       if YAS4906=6 then do; otassetY=175000; end;

       if YAS4906=7 then do; otassetY=250001; end;

   end;

end;

if YAS4880=-1     or YAS4904L=-1 or YAS4904U=-1 or YAS4906=-1 then otassetY=-1;

if YAS4880=-2     or YAS4904L=-2 or YAS4904U=-2 or YAS4906=-2 then otassetY=-2;

if YAS4880=-3 or YAS4902=-3 or YAS4904L=-3 or YAS4904U=-3 or YAS4906=-3 then otassetY=-3;

 

/* Loans still owed to family or relatives */

array rloan rloan01 rloan02 rloan03 rloan04 rloan05 rloan06 rloan07 rloan08 rloan09 rloan10 rloan11 rloan12 rloan13 rloan14 rloan15 rloan16 rloan17 rloan18  rloan19 rloan20;

array A5080 A508001 A508002 A508003 A508004 A508005 A508006 A508007 A508008 A508009 A508010 A508011 A508012 A508013 A508014 A508015 A508016 A508017 A508018 A508019 A508020;

array A5082 A508201 A508202 A508203 A508204 A508205 A508206 A508207 A508208 A508209 A508210 A508211 A508212 A508213 A508214 A508215 A508216 A508217 A508218 A508219 A508220;

array A5084L A5084L01 A5084L02 A5084L03 A5084L04 A5084L05 A5084L06 A5084L07 A5084L08 A5084L09 A5084L10 A5084L11 A5084L12 A5084L13 A5084L14 A5084L15 A5084L16 A5084L17 A5084L18 A5084L19 A5084L20;

array A5084U A5084U01 A5084U02 A5084U03 A5084U04 A5084U05 A5084U06 A5084U07 A5084U08 A5084U09 A5084U10 A5084U11 A5084U12 A5084U13 A5084U14 A5084U15 A5084U16 A5084U17 A5084U18 A5084U19 A5084U20;

array A5086 A508601 A508602 A508603 A508604 A508605 A508606 A508607 A508608 A508609 A508610 A508611 A508612 A508613 A508614 A508615 A508616 A508617 A508618 A508619 A508620;

array A5170 A517001 A517002 A517003 A517004 A517005 A517006 A517007 A517008 A517009 A517010 A517011 A517012 A517013 A517014 A517015 A517016 A517017 A517018 A517019 A517020;

array A5172 A517201 A517202 A517203 A517204 A517205 A517206 A517207 A517208 A517209 A517210 A517211 A517212 A517213 A517214 A517215 A517216 A517217 A517218 A517219 A517220;

array A5174L A5174L01 A5174L02 A5174L03 A5174L04 A5174L05 A5174L06 A5174L07 A5174L08 A5174L09 A5174L10 A5174L11 A5174L12 A5174L13 A5174L14 A5174L15 A5174L16 A5174L17 A5174L18 A5174L19 A5174L20;

array A5174U A5174U01 A5174U02 A5174U03 A5174U04 A5174U05 A5174U06 A5174U07 A5174U08 A5174U09 A5174U10 A5174U11 A5174U12 A5174U13 A5174U14 A5174U15 A5174U16 A5174U17 A5174U18 A5174U19 A5174U20;

array A5176 A517601 A517602 A517603 A517604 A517605 A517606 A517607 A517608 A517609 A517610 A517611 A517612 A517613 A517614 A517615 A517616 A517617 A517618 A517619 A517620;

array A5074 A507401-A507420;

array A5066 A506601-A506620;

array A5164 A516401-A516420;

 

do I=1 to 20;

   rloan(I)=0;

   if YAS5040=1 and YAS5060 ne 1 and YAS5062 ne 1 then do;

      if A5080(I)=1 then rloan(I)=A5082(I);

      if A5080(I)=2 then rloan(I)=(A5084L(I)+(A5084U(I)-A5084L(I))/2);

      if ((A5080(I) ne 1 and A5080(I) ne 2) or (A5082(I)=-1 or A5082(I)=-2)) then do;

         if A5086(I)=1 then do; rloan(I)=500; end;

                 if A5086(I)=2 then do; rloan(I)=1750; end;

                 if A5086(I)=3 then do; rloan(I)=3750; end;

                 if A5086(I)=4 then do; rloan(I)=7500; end;

                 if A5086(I)=5 then do; rloan(I)=17500; end;

                 if A5086(I)=6 then do; rloan(I)=37500; end;

                 if A5086(I)=7 then do; rloan(I)=50001; end;

      end;

   end;

   if YAS5040=-1 or A5074(I)=-1 or A5086(I)=-1 or A5084L[I]=-1 or A5084U[I]=-1 then rloan(I)=-1;

   if YAS5040=-2 or A5074(I)=-2 or A5086(I)=-2 or A5084L[I]=-2 or A5084U[I]=-2 then rloan(I)=-2;

   if YAS5040=-3 or A5082(I)=-3 or A5086(I)=-3 or A5084L[I]=-3 or A5084U[I]=-3 then rloan(I)=-3;

 

   if YAS5130=1 and YAS5150 ne 1 and YAS5152 ne 1 then do;

      if A5170(I)=1 then rloan(I)=A5172(I);

      if A5170(I)=2 then rloan(I)=(A5174L(I)+(A5174U(I)-A5174L(I))/2);

      if ((A5170(I) ne 1 and A5170(I) ne 2) or (A5172(I)=-1 or A5172(I)=-2)) then do;

                 if A5176(I)=1 then do; rloan(I)=500; end;

                 if A5176(I)=2 then do; rloan(I)=1750; end;

                 if A5176(I)=3 then do; rloan(I)=3750; end;

                 if A5176(I)=4 then do; rloan(I)=7500; end;

                 if A5176(I)=5 then do; rloan(I)=17500; end;

                 if A5176(I)=6 then do; rloan(I)=37500; end;

                 if A5176(I)=7 then do; rloan(I)=50001; end;

      end;

   end;

   if YAS5130=-1 or A5164(I)=-1 or A5176(I)=-1 or A5174L[I]=-1 or A5174U[I]=-1 then rloan(I)=-1;

   if YAS5130=-2 or A5164(I)=-2 or A5176(I)=-2 or A5174L[I]=-2 or A5174U[I]=-2 then rloan(I)=-2;

   if YAS5130=-3 or A5172(I)=-3 or A5176(I)=-3 or A5174L[I]=-3 or A5174U[I]=-3 then rloan(I)=-3;

end;

 

/** Other debts from loans, credit cards, etc...         **/

othdebtY=0;

if YAS5210=1 then do;

   if YAS5220=1 then othdebtY=YAS5222;

   if YAS5220=2 then othdebtY=(YAS5224L+(YAS5224U-YAS5224L)/2);

   if ((YAS5220 ne 1 and YAS5220 ne 2) or (YAS5222=-1 or YAS5222=-2)) then do;

      if YAS5226=1 then do; othdebtY=500; end;

      if YAS5226=2 then do; othdebtY=1750; end;

      if YAS5226=3 then do; othdebtY=3750; end;

      if YAS5226=4 then do; othdebtY=7500; end;

      if YAS5226=5 then do; othdebtY=17500; end;

      if YAS5226=6 then do; othdebtY=37500; end;

      if YAS5226=7 then do; othdebtY=50001; end;

   end;

end;

if YAS5210=-1 or YAS5224L=-1 or YAS5224U=-1 or YAS5226=-1 then othdebtY=-1;

if YAS5210=-2 or YAS5224L=-2 or YAS5224U=-2 or YAS5226=-2 then othdebtY=-2;

if YAS5210=-3 or YAS5222=-3 or YAS5224L=-3 or YAS5224U=-3 or YAS5226=-3 then othdebtY=-3;

 

/** We now calculate the household net worth according to the youth: hhworthY=assets-liabilities.          **/

/**  Till Round 3 we have used YAST-050 as the question determining whether respondents are asked the assets question but in this round YAST-105 does that. So we switched to using YAST-105 instead of YAST-050 as well.  **/

if (YAS105=0 or YAS105=1) then do;

   hhworthY=0;

   if pvranch  NOT in (-1, -2, -3) then hhworthY=hhworthY+pvranch;

   if pvmbst   NOT in (-1, -2, -3) then hhworthY=hhworthY+pvmbst;

   if pvmb     NOT in (-1, -2, -3) then hhworthY=hhworthY+pvmb;

   if pvst     NOT in (-1, -2, -3) then hhworthY=hhworthY+pvst;

   if pvapthm  NOT in (-1, -2, -3) then hhworthY=hhworthY+pvapthm;

   if pvbuss   NOT in (-1, -2, -3) then hhworthY=hhworthY+pvbuss;

   if secrestY NOT in (-1, -2, -3) then hhworthY=hhworthY+secrestY;

   if retireY  NOT in (-1, -2, -3) then hhworthY=hhworthY+retireY;

   if savingsY NOT in (-1, -2, -3) then hhworthY=hhworthY+savingsY;

   if othsavY  NOT in (-1, -2, -3) then hhworthY=hhworthY+othsavY;

   if stockY   NOT in (-1, -2, -3) then hhworthY=hhworthY+stockY;

   if pvcarsY  NOT in (-1, -2, -3) then hhworthY=hhworthY+pvcarsY;

   if pvfurntY NOT in (-1, -2, -3) then hhworthY=hhworthY+pvfurntY;

   if otassetY NOT in (-1, -2, -3) then hhworthY=hhworthY+otassetY;

   if mortgagY NOT in (-1, -2, -3) then hhworthY=hhworthY-mortgagY;

   if loanowed NOT in (-1, -2, -3) then hhworthY=hhworthY-loanowed;

   if stilowed NOT in (-1, -2, -3) then hhworthY=hhworthY-stilowed;

   if secmortY NOT in (-1, -2, -3) then hhworthY=hhworthY-secmortY;

   if cardebt  NOT in (-1, -2, -3) then hhworthY=hhworthY-cardebt;

   if othdebtY NOT in (-1, -2, -3) then hhworthY=hhworthY-othdebtY;

   do I=1 to 20; if rloan[I] NOT in (-1, -2, -3) then hhworthY=hhworthY-rloan[I]; end;

end;

 

if YAS105=-4 then do; hhworthY=-4; VskpHHY=1; end;

 

if YAS105=-1 or (pvranch=-1 or pvmbst=-1 or pvmb=-1 or pvst=-1 or pvapthm=-1 or pvbuss=-1 or secrestY=-1 or retireY=-1 or savingsY=-1 or othsavY=-1 or stockY=-1 or pvcarsY=-1 or pvfurntY=-1 or otassetY=-1 or mortgagY=-1 or loanowed=-1 or stilowed=-1 or secmortY=-1 or cardebt=-1 or rloan01=-1 or rloan02=-1 or rloan03=-1 or rloan04=-1 or rloan05=-1 or rloan06=-1 or rloan07=-1 or rloan08=-1 or rloan09=-1 or rloan10=-1 or rloan11=-1 or rloan12=-1 or rloan13=-1 or rloan14=-1 or rloan15=-1 or rloan16=-1 or rloan17=-1 or rloan18=-1 or rloan19=-1 or rloan20=-1 or othdebtY=-1) then do;

   hhworthY=-1;

   InvskpHHY=1;

end;

if YAS105=-2 or (pvranch=-2 or pvmbst=-2 or pvmb=-2 or pvst=-2 or pvapthm=-2 or pvbuss=-2 or secrestY=-2 or retireY=-2 or savingsY=-2 or othsavY=-2 or stockY=-2 or pvcarsY=-2 or pvfurntY=-2 or otassetY=-2 or  mortgagY=-2 or loanowed=-2 or stilowed=-2 or secmortY=-2 or cardebt=-2 or rloan01=-2 or rloan02=-2 or rloan03=-2 or rloan04=-2 or rloan05=-2 or rloan06=-2 or rloan07=-2 or rloan08=-2 or rloan09=-2 or rloan10=-2 or rloan11=-2 or rloan12=-2 or rloan13=-2 or rloan14=-2 or rloan15=-2 or rloan16=-2 or rloan17=-2 or rloan18=-2 or rloan19=-2 or rloan20=-2 or othdebtY=-2) then do;

   hhworthY=-2;

   InvskpHHY=2;

end;

if YAS105=-3 or (pvranch=-3 or pvmbst=-3 or pvmb=-3 or pvst=-3 or pvapthm=-3 or pvbuss=-3 or secrestY=-3 or retireY=-3 or savingsY=-3 or othsavY=-3 or stockY=-3 or pvcarsY=-3 or pvfurntY=-3 or otassetY=-3 or mortgagY=-3 or loanowed=-3 or stilowed=-3 or secmortY=-3 or cardebt=-3 or rloan01=-3 or rloan02=-3 or rloan03=-3 or rloan04=-3 or rloan05=-3 or rloan06=-3 or rloan07=-3 or rloan08=-3 or rloan09=-3 or rloan10=-3 or rloan11=-3 or rloan12=-3 or rloan13=-3 or rloan14=-3 or rloan15=-3 or rloan16=-3 or rloan17=-3 or rloan18=-3 or rloan19=-3 or rloan20=-3 or othdebtY=-3) then do;

   hhworthY=-3;

   InvskpHHY=3;

end;

 

/** HANDEDIT: These respondents give a positive value for the lower limit but ZERO for the upper limit for certain assets. So we give them a -3.      **/

if pubid=430 or pubid=432 or pubid=614 or pubid=1829 or pubid=3065 or pubid=7785 or pubid=7983 or pubid=8164 or pubid=8441 then do;

   hhworthY=-3; FLAG_RANGE=1; InvskpHHY=3; end;

 

/** give the people who were not interviewed in round 5 value -5.  **/

if YAS105=-5 then do; hhworthY=-5; nonintHHY=1; end;

 

hhworthY=ROUND(hhworthY,1);


/******************* SECTION 3:  HOUSEHOLD POVERTY STATUS *********************/

/** Create the poverty thresholds    (taken from U.S.Census' website - http://www.census.gov/hhes/poverty/threshld/thresh00.html) **/

 

povert=-4;

 

if HHSIZE=-1 or under18=-1 then povert=-1;

if HHSIZE=-2 or under18=-2 then povert=-2;

if HHSIZE=-3 or under18=-3 then povert=-3;

 

if HHSIZE=1 then povert=8959;

 

if HHSIZE=2 then do;

   if under18=0 then povert=11531;

   if under18=1 then povert=11869;

   if under18=2 then povert=11869;

end;

 

if HHSIZE=3 then do;

   if under18=0 then povert=13470;

   if under18=1 then povert=13861;

   if under18=2 then povert=13874;

   if under18=3 then povert=13874;

end;

 

if HHSIZE=4 then do;

   if under18=0 then povert=17761;

   if under18=1 then povert=18052;

   if under18=2 then povert=17463;

   if under18=3 then povert=17524;

   if under18=4 then povert=17524;

end;

 

if HHSIZE=5 then do;

   if under18=0 then povert=21419;

   if under18=1 then povert=21731;

   if under18=2 then povert=21065;

   if under18=3 then povert=20550;

   if under18=4 then povert=20236;

   if under18=5 then povert=20236;

end;

 

if HHSIZE=6 then do;

   if under18=0 then povert=24636;

   if under18=1 then povert=24734;

   if under18=2 then povert=24224;

   if under18=3 then povert=23736;

   if under18=4 then povert=23009;

   if under18=5 then povert=22579;

   if under18=6 then povert=22579;