Variable Creation: Total Net Family Income 1996-2020

Variable Creation: Total Net Family Income 1996-2020

 

1996 Variables

           DO I=17;

                AFDC(I)=-4;

                ALIM(I)=-4;

                CHSP(I)=-4;

                CPS(I)=-4;

                ED(I)=-4;

                EDSS(I)=-4;

                FAMILY(I)=-4;

                FAMINC(I)=-4;

                FOOD(I)=-4;

                INCOME(I)=-4;

                LEVEL(I)=-4;

                MIL(I)=-4;

                MILS(I)=-4;

                DO J=1 TO 3;

                   MN(I,J)=-4;

                END;

                OTHER(I)=-4;

                PUBLIC(I)=-4;

                RELREG(I)=-4;

                RELWEL(I)=-4;

                S(I)=-4;

                SEI(I)=-4;

                SEIS(I)=-4;

                SUMN(I)=-4;

                DO J=1 TO 3;

                   DO K=1 TO 15;

                     TABLE(I,J,K)=-4;

                   END;

                END;

                UI(I)=-4;

                UIS(I)=-4;

                VET(I)=-4;

                WPS(I)=-4;

                WPSS(I)=-4;

          END;

 

/* Several variables pertaining to recipiency from various government income programs were computed from            */

/* a number of different variables in 1994, due to the change to an event history format for data collection.                 */

/* these variables are as follows:                                                                                                                              */

/* WKTOT95U = Total number of weeks R received unemployment compensation in calendar year 1995                     */

/* RCTOT95U = Total amount of unemployment compensation R received in calendar year 1995              */

/* WKTOT95S = Total number of weeks R's spouse received unemployment compensation in calendar year    */

/*                         1995                                                                                                                              */

/* RCTOT95U = Total amount of unemployment compensation R's spouse received in calendar year 1995                  */

/* MOTOT95A = Total number of months R or spouse received AFDC payments in calendar year 1995  */

/* RCTOT95A = Total amount of AFDC R or spouse received in calendar year 1995                                    */

/* MOTOT95F = Total number of months R or spouse received government food stamps in calendar year                  */

/*                         1995                                                                                                                              */

/* RCTOT95F = Total amount of government food stamps R or spouse received in calendar year 1995    */

/* MOTOT95W = Total number of months R or spouse received other welfare or public assistance payments           */

/*                           in calendar year 1995                                                                                               */

/* RCTOT95W = Total amount of other welfare or public assistance payments R or spouse received in   */

/*                         calendar year 1995                                                                                                                          */

          IF R(56260.)=-4 THEN MIL(17)=0;

          ELSE MIL(17)=R(56260.);

          IF R(56262.)=-4 THEN WPS(17)=0;

          ELSE WPS(17)=R(56262.);

          IF R(56266.)=-4 THEN SEI(17)=0;

          ELSE SEI(17)=R(56266.);

          IF WKTOT95U=-4 & RCTOT95U=-4 THEN UI(17)=0;

          ELSE IF WKTOT95U>0 & RCTOT95U>0 THEN UI(17)=WKTOT95U * RCTOT95U;

          ELSE IF RCTOT95U<0 THEN UI(17)=RCTOT95U;

          ELSE UI(17)=-3;

          IF Q13_16=-4 THEN MILS(17)=0;

          ELSE MILS(17)= Q13_16;

          IF R(56508.)=-4 THEN WPSS(17)=0;

          ELSE WPSS(17)=R(56508.);

          IF R(56514.)=-4 THEN SEIS(17)=0;

          ELSE SEIS(17)=R(56514.);

          IF WKTOT95S=-4 & RCTOT95S=-4 THEN UIS(17)=0;

          ELSE IF WKTOT95S>0 & RCTOT95S>0 THEN UIS(17)=WKTOT95S * RCTOT95S;

          ELSE IF RCTOT95S<0 THEN UIS(17)=RCTOT95S;

          ELSE UIS(17)=-3;

          IF Q13_32=-4 THEN ALIM(17)=0;

          ELSE ALIM(17)= Q13_32;

          IF Q13_33I=-4 THEN CHSP(17)=0;

          ELSE CHSP(17)= Q13_33I;

          IF Q13_33M=-4 THEN CHSP(17)=0;

          ELSE CHSP(17)= Q13_33M;

          IF RCTOT95A=-4 THEN AFDC(17)=0;

          ELSE DO;

             IF RCTOT95A<0 THEN AFDC(17)=RCTOT95A;

             ELSE IF MOTOT95A<=0 THEN AFDC(17)=-3;

             ELSE AFDC(17)=RCTOT95A * MOTOT95A;

          END;

          IF RCTOT95F=-4 THEN FOOD(17)=0;

          ELSE DO;

             IF RCTOT95F<0 THEN FOOD(17)=RCTOT95F;

             ELSE IF MOTOT95F<=0 THEN FOOD(17)=-3;

             ELSE FOOD(17)=RCTOT95F * MOTOT95F;

          END;

          IF RCTOT95W=-4 THEN PUBLIC(17)=0;

          ELSE DO;

             IF RCTOT95W<0 THEN PUBLIC(17)=RCTOT95W;

             ELSE IF MOTOT95W<=0 THEN PUBLIC(17)=-3;

             ELSE PUBLIC(17)=RCTOT95W * MOTOT95W;

          END;

          IF R(57255.)=-4 THEN ED(17)=0;

          ELSE ED(17)=R(57255.);

          IF R(57257.)=-4 THEN EDSS(17)=0;

          ELSE EDSS(17)=R(57257.);

          IF Q13_70=-4 THEN VET(17)=0;

          ELSE VET(17)= Q13_70;

          IF R(57264.)=-4 THEN OTHER(17)=0;

          ELSE OTHER(17)=R(57264.);

          IF VET(17)>0 & OTHER(17)=VET(17) THEN OTHER(17)=0;

          IF Q13_92=-4 THEN RELWEL(17)=0;

          ELSE RELWEL(17)= Q13_92;

          IF Q13_92C=-4 THEN RELREG(17)=0;

          ELSE RELREG(17)= Q13_92C;

          FAMILY(17)=FAMSZ96; /* TO CREATE FAMILY SIZE (I.E. FAMSZ96)

                                SEARCH THRU THE HOUSEHOLD ENUMERATION

                                INCREMENT FAMILY SIZE, IF THE

                                RELATIONSHIP TO THE YOUTH IS A RELATIVE.

                                DO NOT INCREASE FAMILY SIZE, IF THE CODE

                                IS <0 OR (>=33 & <=36) OR =45 OR =46 OR

                                (>=50 & <=54) */

         DCL COMPONENT(19) FIXED DEC(9);

         DO I=17;

            MN(I,1)=0; MN(I,2)=0; MN(I,3)=0;

            FAMINC(I)=0;

            INCOME(I)=-3;

            COMPONENT(1)=MIL(I);  

            COMPONENT(2)=MILS(I);  

            COMPONENT(3)=WPS(I);   

            COMPONENT(4)=WPSS(I);  

            COMPONENT(5)=SEI(I);

            COMPONENT(6)=SEIS(I);  

            COMPONENT(7)=UI(I);    

            COMPONENT(8)=UIS(I);   

            COMPONENT(9)=ALIM(I);  

            COMPONENT(10)=CHSP(I); 

            COMPONENT(11)=AFDC(I); 

            COMPONENT(12)=PUBLIC(I);

            COMPONENT(13)=ED(I);   

            COMPONENT(14)=EDSS(I); 

            COMPONENT(15)=VET(I);  

            COMPONENT(16)=OTHER(I);

            COMPONENT(17)=RELWEL(I);

            COMPONENT(18)=RELREG(I);

            COMPONENT(19)=FOOD(I); 

            IF WEIGHT(I)=0 THEN DO;

               INCOME(I)=-5;

               CPS(I)=-5;

               LEVEL(I)=-5;

            END;

            ELSE DO;

                 DO K=1 TO 19;

                    IF COMPONENT(K)>-4 THEN DO;

                       IF COMPONENT(K)<0 THEN

                          MN(I,ABS(COMPONENT(K)))=MN(I,ABS(COMPONENT(K)))+1;

                       ELSE FAMINC(I)=FAMINC(I)+COMPONENT(K);

                     END;

                  END;  

               SUMN(I)=MN(I,1) + MN(I,2) + MN(I,3);

               IF SUMN(I)=0 THEN INCOME(I)=FAMINC(I);

               ELSE DO J=1 TO 3;

                   IF MN(I,J)>0 THEN INCOME(I)=-J;

               END;

    /* income trunc  */

     /*   IF INCOME(I) > 100000 THEN INCOME(I) = 500000; */

 

            IF FAMILY(I)>0 THEN DO;

                LEVEL(I)=TABLE(I,S(I),FAMILY(I));

                IF INCOME(I)>LEVEL(I) THEN CPS(I)=0;

                ELSE IF INCOME(I)>= 0 & INCOME(I)<=LEVEL(I) THEN CPS(I)=1;

                ELSE CPS(I)=-3;

            END;

          END;

        END;

   DO I=1 TO 3;

      IF MN(17,I)>0 THEN MN(17,I)=1;

   END;

   IF SUMN(17)>0 THEN SUMN(17)=1;

INCOME(17)=R(51660.)

CPS(17)=R(51661.)

LEVEL(17)=R(51662.)

 

1998 Variables

/*programming for the 1998 variable TNFI is done in SPSS.   Only question numbers are listed.*/

 

COMPUTE AFDC_CUR=-4

COMPUTE CHSP_CUR=-4

COMPUTE CHSPS_C=-4

COMPUTE CPS_CUR=-4

COMPUTE ED_CUR=-4

COMPUTE EDSS_CUR=-4

COMPUTE FAMILY_C=-4 

COMPUTE FAMINC_C=-4

COMPUTE FOOD_CUR=-4

COMPUTE INCOME_C=-4

COMPUTE LEVEL_C=-4

COMPUTE MIL_CUR=-4

COMPUTE MILS_CUR=-4

COMPUTE MN1701=-4

COMPUTE MN1702=-4

COMPUTE MN1703=-4

COMPUTE OTHER_C=-4

COMPUTE SSI_CUR=-4

COMPUTE RELREG_C=-4

COMPUTE RELWEL_C=-4

COMPUTE S_CUR=-4

COMPUTE SEI_CUR=-4

COMPUTE SEIS_CUR=-4

COMPUTE SUMN_CUR=-4

COMPUTE UI_CUR=-4

COMPUTE UIS_CUR=-4

COMPUTE VET_CUR=-4

COMPUTE WPS_CUR=-4

COMPUTE WPSS_CUR=-4

 

/* Several variables pertaining to recipiency from various government income programs were computed from */

/* a number of different variables in 1997, due to the change to an event history format for data collection.*/

/* these variables are as follows:  */

/* WKTOT97U = Total number of weeks R received unemployment compensation in calendar year 1997*/

/* RCTOT97U = Total amount of unemployment compensation R received in calendar year 1997*/

/* WKTOT97S = Total number of weeks R's spouse received unemployment compensation in calendar year 1997*/

/* RCTOT97U = Total amount of unemployment compensation R's spouse received in calendar year 1997*/

/* MOTOT97A = Total number of months R or spouse received AFDC payments in calendar year 1997*/

/* RCTOT97A = Total amount of AFDC R or spouse received in calendar year 1997*/

/* MOTOT97F = Total number of months R or spouse received government food stamps in calendar year 1997*/

/* RCTOT97F = Total amount of government food stamps R or spouse received in calendar year 1997*/

/* MOTOT97W = Total number of months R or spouse received other welfare or public assistance payments*/

/*                           in calendar year 1997*/

/* RCTOT97W = Total amount of other welfare or public assistance payments R or spouse received in*/

/*                         calendar year 1997*/

 

 

DO IF (Q13_3 = -4)

COMPUTE MIL_CUR=0

ELSE

COMPUTE MIL_CUR=Q13_3

END IF

DO IF (Q13_5 = -4)

COMPUTE WPS_CUR=0

ELSE

COMPUTE WPS_CUR=Q13_5

END IF

DO IF (Q13_9 = -4)

COMPUTE SEI_CUR=0

ELSE

COMPUTE SEI_CUR=Q13_9

END IF

DO IF (WKTOT97U = -4 AND RCTOT97U = -4)

COMPUTE UI_CUR=0

ELSE IF (WKTOT97U = -4 AND RCTOT97U = 0)

COMPUTE UI_CUR=0

ELSE IF (WKTOT97U > 0 AND RCTOT97U > 0)

COMPUTE UI_CUR=(WKTOT97U * RCTOT97U)

ELSE IF (WKTOT97U < 0)

COMPUTE UI_CUR=WKTOT97U

ELSE IF (RCTOT97U < 0)

COMPUTE UI_CUR=RCTOT97U

ELSE

COMPUTE UI_CUR=-3

END IF

 

DO IF (PAFLAGA EQ 1 OR Q13_16 = -4)

COMPUTE MILS_CUR=0

ELSE

COMPUTE MILS_CUR=Q13_16

END IF

 

DO IF (PAFLAGA EQ 1 OR Q13_18 = -4)

COMPUTE WPSS_CUR=0

ELSE

COMPUTE WPSS_CUR=Q13_18

END IF

 

DO IF (PAFLAGA EQ 1 OR Q13_24 = -4)

COMPUTE SEIS_CUR=0

ELSE

COMPUTE SEIS_CUR=Q13_24

END IF

 

DO IF (PAFLAGA EQ 1 OR (WKTOT97S = -4 AND RCTOT97S = -4))

COMPUTE UIS_CUR=0

ELSE IF (PAFLAGA EQ 1 OR (WKTOT97S = -4 AND RCTOT97S = 0))

COMPUTE UIS_CUR=0

ELSE IF (WKTOT97S > 0 AND RCTOT97S > 0)

COMPUTE UIS_CUR=(WKTOT97S * RCTOT97S)

ELSE IF (WKTOT97S < 0)

COMPUTE UIS_CUR=WKTOT97S

ELSE IF (RCTOT97S < 0)

COMPUTE UIS_CUR=RCTOT97S 

ELSE

COMPUTE UIS_CUR=-3

END IF

 

DO IF (Q13_33I = -4)

COMPUTE CHSP_CUR=0

ELSE

COMPUTE CHSP_CUR=Q13_33I

END IF

DO IF (PAFLAGA EQ 1 OR Q13_33M = -4)

COMPUTE CHSPS_C=0

ELSE

COMPUTE CHSPS_C=Q13_33M

END IF

DO IF (RCTOT97A EQ -4 OR RCTOT97A EQ 0)

COMPUTE AFDC_CUR=0

ELSE IF (MOTOT97A EQ -4 OR MOTOT97A EQ 0)

COMPUTE AFDC_CUR=0

ELSE IF (RCTOT97A < 0)

COMPUTE AFDC_CUR=RCTOT97A

ELSE IF (MOTOT97A < 0)

COMPUTE AFDC_CUR=MOTOT97A

ELSE IF (MOTOT97A <= 0)

COMPUTE AFDC_CUR=-3

ELSE

COMPUTE AFDC_CUR=(RCTOT97A * MOTOT97A)

END IF

DO IF (RCTOT97F EQ -4 OR RCTOT97F EQ 0)

COMPUTE FOOD_CUR=0

ELSE IF (MOTOT97F EQ -4 OR MOTOT97F EQ 0)

COMPUTE FOOD_CUR=0

ELSE IF (RCTOT97F < 0)

COMPUTE FOOD_CUR=RCTOT97F 

ELSE IF (MOTOT97F < 0)

COMPUTE FOOD_CUR=MOTOT97F 

ELSE IF (MOTOT97F <= 0)

COMPUTE FOOD_CUR=-3

ELSE

COMPUTE FOOD_CUR=(RCTOT97F * MOTOT97F)

END IF

DO IF (RCTOT97W EQ -4 OR RCTOT97W EQ 0)

COMPUTE SSI_CUR=0

ELSE IF (MOTOT97W EQ -4 OR MOTOT97W EQ 0)

COMPUTE SSI_CUR=0

ELSE IF (RCTOT97W < 0)

COMPUTE SSI_CUR=RCTOT97W 

ELSE IF (MOTOT97W < 0)

COMPUTE SSI_CUR=MOTOT97W 

ELSE IF (MOTOT97W <= 0)

COMPUTE SSI_CUR=-3

ELSE

COMPUTE SSI_CUR=(RCTOT97W * MOTOT97W)

END IF

 

DO IF (Q13_66 = -4)

COMPUTE ED_CUR=0

ELSE

COMPUTE ED_CUR=Q13_66

END IF

 

DO IF (PAFLAGA EQ 1 OR Q13_68 = -4)

COMPUTE EDSS_CUR=0

ELSE 

COMPUTE EDSS_CUR=Q13_68

END IF

DO IF (Q13_70A = -4) 

COMPUTE VET_CUR=0

ELSE 

COMPUTE VET_CUR=Q13_70A

END IF

DO IF (Q13_75 = -4) 

COMPUTE OTHER_C=0

ELSE 

COMPUTE OTHER_C=Q13_75

END IF

IF (VET_CUR > 0 AND OTHER_C = VET_CUR) OTHER_C=0

DO IF (Q13_92 = -4)

COMPUTE RELWEL_C=0

ELSE

COMPUTE RELWEL_C=Q13_92

END IF

DO IF (Q13_92C = -4)

COMPUTE RELREG_C=0

ELSE 

COMPUTE RELREG_C=Q13_92C

END IF

 

COMPUTE FAMILY_C=FAMSZ98 /* TO CREATE FAMILY SIZE (I.E. FAMSZ98) */

                            /*  SEARCH THRU THE HOUSEHOLD ENUMERATION */

                            /*  INCREMENT FAMILY SIZE, IF THE     */

                            /*  RELATIONSHIP TO THE YOUTH IS A RELATIVE. */

                            /*  DO NOT INCREASE FAMILY SIZE, IF THE CODE */

                            /*  IS <0 OR (>=33 & <=36) OR =45 OR =46 OR */

                            /*  (>=50 & <=54) */

COMPUTE MN1701=0 

COMPUTE MN1702=0 

COMPUTE MN1703=0

COMPUTE FAMINC_C=0

COMPUTE INCOME_C=-3

COMPUTE COMPO1=MIL_CUR   

COMPUTE COMPO2=MILS_CUR   

COMPUTE COMPO3=WPS_CUR    

COMPUTE COMPO4=WPSS_CUR   

COMPUTE COMPO5=SEI_CUR

COMPUTE COMPO6=SEIS_CUR   

COMPUTE COMPO7=UI_CUR     

COMPUTE COMPO8=UIS_CUR    

COMPUTE COMPO9=CHSP_CUR  

COMPUTE COMPO10=AFDC_CUR  

COMPUTE COMPO11=SSI_CUR

COMPUTE COMPO12=ED_CUR    

COMPUTE COMPO13=EDSS_CUR  

COMPUTE COMPO14=VET_CUR   

COMPUTE COMPO15=OTHER_C 

COMPUTE COMPO16=RELWEL_C

COMPUTE COMPO17=RELREG_C

COMPUTE COMPO18=FOOD_CUR

COMPUTE COMPO19=CHSPS_C

DO IF (WKTOT97U EQ -4 AND RCTOT97U GT 0)

COMPUTE UI_CUR=-3

COMPUTE COMPO7=-3

ELSE IF (WKTOT97U LT 0 AND WKTOT97U GT -4)

COMPUTE UI_CUR=-3

COMPUTE COMPO7=-3

END IF

DO IF (WKTOT97S EQ -4 AND RCTOT97S GT 0)

COMPUTE UIS_CUR=-3

COMPUTE COMPO8=-3

ELSE IF (WKTOT97S LT 0 AND WKTOT97S GT -4)

COMPUTE UIS_CUR=-3

COMPUTE COMPO8=-3

END IF

DO IF (MOTOT97A EQ -4 AND RCTOT97A GT 0)

COMPUTE AFDC_CUR=-3

COMPUTE COMPO10=-3

ELSE IF (MOTOT97A LT 0 AND MOTOT97A GT -4)

COMPUTE AFDC_CUR=-3

COMPUTE COMPO10=-3

END IF

DO IF (MOTOT97F EQ -4 AND RCTOT97F GT 0)

COMPUTE FOOD_CUR=-3

COMPUTE COMPO18=-3

ELSE IF (MOTOT97F LT 0 AND MOTOT97F GT -4)

COMPUTE FOOD_CUR=-3

COMPUTE COMPO18=-3

END IF

DO IF (MOTOT97W EQ -4 AND RCTOT97W GT 0)

COMPUTE SSI_CUR=-3

COMPUTE COMPO11=-3

ELSE IF (MOTOT97W LT 0 AND MOTOT97W GT -4)

COMPUTE SSI_CUR=-3

COMPUTE COMPO11=-3

END IF

DO REPEAT COMPO=COMPO1 TO COMPO19

DO IF (COMPO > -4)

DO IF (COMPO < 0 AND COMPO EQ -1)

COMPUTE MN1701=(MN1701+1)

ELSE IF (COMPO < 0 AND COMPO EQ -2)

COMPUTE MN1702=(MN1702+1)

ELSE IF (COMPO < 0 AND COMPO EQ -3)

COMPUTE MN1703=(MN1703+1)

ELSE

COMPUTE FAMINC_C=(FAMINC_C + COMPO)

END IF

END IF

END REPEAT 

DO IF (SUMN_CUR = 0)

COMPUTE INCOME_C=FAMINC_C

ELSE

DO IF (MN1703 > 0)

COMPUTE INCOME_C=-3

ELSE IF (MN1702 > 0)

COMPUTE INCOME_C=-2

ELSE IF (MN1701 > 0)

COMPUTE INCOME_C=-1

END IF

END IF

IF (PAFLAGA EQ -5) INCOME_C=-5

    /* INCOME TRUNC  */

/* IF (INCOME_C >= 161400) INCOME_C=1022003 */

END IF

DO IF (INCOME_C > LEVEL_C)

COMPUTE CPS_CUR=0

ELSE IF (INCOME_C >= 0 AND INCOME_C <= LEVEL_C)

COMPUTE CPS_CUR=1

ELSE

COMPUTE CPS_CUR=-3

END IF

DO REPEAT MN=MN1701 TO MN1703

IF (MN > 0) MN=1

END REPEAT PRINT

IF (SUMN_CUR > 0) SUMN_CUR=1

IF (PAFLAGA EQ -5) LEVEL_C=-5

IF (PAFLAGA EQ -5) CPS_CUR=-5

 

2000 Variables

/*programming for the 2000 variable TNFI is done in SPSS.   Only question numbers are listed.*/

COMPUTE afdc_cur=-4

COMPUTE chsp_cur=-4

COMPUTE chsps_c=-4

COMPUTE cps_cur=-4

COMPUTE ed_cur=-4

COMPUTE edss_cur=-4

COMPUTE family_c=-4

COMPUTE faminc_c=-4

COMPUTE food_cur=-4

COMPUTE income_c=-4

COMPUTE level_c=-4

COMPUTE mil_cur=-4

COMPUTE mils_cur=-4

COMPUTE mn1701=-4

COMPUTE mn1702=-4

COMPUTE mn1703=-4

COMPUTE other_c=-4

COMPUTE ssi_cur=-4

COMPUTE relreg_c=-4

COMPUTE relwel_c=-4

COMPUTE s_cur=-4

COMPUTE sei_cur=-4

COMPUTE seis_cur=-4

 COMPUTE sumn_cur=-4

COMPUTE ui_cur=-4

COMPUTE uis_cur=-4

COMPUTE vet_cur=-4

COMPUTE wps_cur=-4

COMPUTE wpss_cur=-4

COMPUTE wkcmp_c=-4

 

/* Several variables pertaining to recipiency from various government income programs were computed from                 */

/* a number of different variables in 1999, due to the change to an event history format for data collection.                   */

/* these variables are as follows:                                                                                                                                                 */

/* WKTOT99U = Total number of weeks R received unemployment compensation in calendar year 1999                   */

/* RCTOT99U = Total amount of unemployment compensation R received in calendar year 1999                               */

/* WKTOT99S = Total number of weeks R's spouse received unemployment compensation in calendar year 1999      */

/* RCTOT99U = Total amount of unemployment compensation R's spouse received in calendar year 1999                 */

/* MOTOT99A = Total number of months R or spouse received AFDC payments in calendar year 1999                     */

/* RCTOT99A = Total amount of AFDC R or spouse received in calendar year 1999                                                      */

/* MOTOT99F = Total number of months R or spouse received government food stamps in calendar year 1999         */

/* RCTOT99F = Total amount of government food stamps R or spouse received in calendar year 1999                        */

/* MOTOT99W = Total number of months R or spouse received other welfare or public assistance payments              */

/*                           in calendar year 1999                                                                                                                                 */

/* RCTOT99W = Total amount of other welfare or public assistance payments R or spouse received in                          */

                                                

do if (Q13_3 = -4)

COMPUTE mil_cur=0                               

else

COMPUTE mil_cur=Q13_3        

end if                                          

do if (Q13_5 = -4)

COMPUTE wps_cur=0                               

else

COMPUTE wps_cur=Q13_5

end if                                          

/* new series to incorporate new farm & bus income qs */ COMPUTE fjt_inc=fjt_141

do if (fjt_inc eq -4)

COMPUTE farm_cur=0

else

COMPUTE farm_cur=fjt_inc

end if

COMPUTE bpjt_inc=bp_141

do if (bpjt_inc eq -4)

COMPUTE bus_cur=0

else

COMPUTE bus_cur=bpjt_inc

end if

 

COMPUTE fbr_inc=q13_132d

do if (fbr_inc eq -4)

COMPUTE fbr_cur=0

else

COMPUTE fbr_cur=fbr_inc

end if

do if (Q13_9 = -4)

COMPUTE sei_cur=0                               

else

COMPUTE sei_cur=Q13_9

end if

if (farm_cur gt 0) sei_cur=(sei_cur+farm_cur)

if (bus_cur gt 0) sei_cur=(sei_cur+bus_cur)

if (fbr_cur gt 0) sei_cur=(sei_cur+fbr_cur)

do if (wktot99u = -4 and rctot99u = -4)

COMPUTE ui_cur=0

else if (wktot99u = -4 and rctot99u = 0)

COMPUTE ui_cur=0

else if (wktot99u > 0 and rctot99u > 0)

COMPUTE ui_cur=rctot99u

else if (wktot99u < 0)

COMPUTE ui_cur=wktot99u

else if (rctot99u < 0)

COMPUTE ui_cur=rctot99u

else

COMPUTE ui_cur=-3

end if

do if (paflaga eq 1 or Q13_16 = -4)

COMPUTE mils_cur=0

else

COMPUTE mils_cur=Q13_16

end if

do if (paflaga eq 1 or Q13_18 = -4)

COMPUTE wpss_cur=0

else

COMPUTE wpss_cur=Q13_18                            end if

do if (paflaga eq 1 or Q13_24 = -4)

COMPUTE seis_cur=0

else

COMPUTE seis_cur=Q13_24

end if

do if (paflaga eq 1 or (wktot99s = -4 and rctot99s = -4))   

COMPUTE uis_cur=0

else if 

(paflaga eq 1 or (wktot99s = -4 and rctot99s = 0))   

COMPUTE uis_cur=0

else if 

(wktot99s > 0 and rctot99s > 0)

COMPUTE uis_cur=rctot99s

else if 

(wktot99s < 0)

COMPUTE uis_cur=wktot99s

else if (rctot99s < 0)

COMPUTE uis_cur=rctot99s

else

COMPUTE uis_cur=-3

end if

do if (q13_31b = -4)

COMPUTE wkcmp_c=0

else

COMPUTE wkcmp_c=q13_31b

end if

do if (Q13_33I = -4)

COMPUTE chsp_cur=0

else

COMPUTE chsp_cur=Q13_33I

end if

do if (paflaga eq 1 or Q13_33M = -4)

COMPUTE chsps_c=0

else

COMPUTE chsps_c=Q13_33M

end if

do if (rctot99a eq -4 or rctot99a eq 0)

COMPUTE afdc_cur=0

else if (motot99a eq -4 or motot99a eq 0)

COMPUTE afdc_cur=0

else if (rctot99a < 0)

COMPUTE afdc_cur=rctot99a

else if (motot99a < 0)     

COMPUTE afdc_cur=motot99a

else if (motot99a <= 0)

COMPUTE afdc_cur=-3

else                                                     

COMPUTE afdc_cur=rctot99a

end if

do if (rctot99f eq -4 or rctot99f eq 0)       

COMPUTE food_cur=0

else if (motot99f eq -4 or motot99f eq 0)   

COMPUTE food_cur=0

else if (rctot99f < 0)     

COMPUTE food_cur=rctot99f

else if (motot99f < 0)            

 COMPUTE food_cur=motot99f

else if (motot99f <= 0)            

COMPUTE food_cur=-3

else                

COMPUTE food_cur=rctot99f                              end if

do if (rctot99w eq -4 or rctot99w eq 0) 

COMPUTE ssi_cur=0

else if (motot99w eq -4 or motot99w eq 0)  

COMPUTE ssi_cur=0

else if (rctot99w < 0)    

COMPUTE ssi_cur=rctot99w

else if (motot99w < 0)  

COMPUTE ssi_cur=motot99w

else if (motot99w <= 0)     

COMPUTE ssi_cur=-3

else

COMPUTE ssi_cur=rctot99w 

   end if

do if (Q13_66 = -4)

COMPUTE ed_cur=0

else  

COMPUTE ed_cur=Q13_66                

end if

do if (paflaga eq 1 or Q13_68 = -4) 

COMPUTE edss_cur=0

else           

COMPUTE edss_cur=Q13_68   

end if

do if (q13_70 = -4)  

COMPUTE vet_cur=0

else      

COMPUTE vet_cur=q13_70    

end if

do if (Q13_75 = -4)

COMPUTE other_c=0

else      

COMPUTE other_c=Q13_75      

end if

 if (vet_cur > 0 and other_c = vet_cur) other_c=0

do if (Q13_92 = -4) 

COMPUTE relwel_c=0

else    

COMPUTE relwel_c=Q13_92  

end if

 do if (Q13_92C = -4) 

COMPUTE relreg_c=0

else    

COMPUTE relreg_c=Q13_92C  

end if

compute family_c=famsz00 /* To create family size (i.e. famsz00) search thru the household enumeration.  Increment family size, if the relationship to the youth is a relative.  Do not increase family size, if the code is <0 or (>=33 & <=36) or =45 or =46 or (>=50 & <=54) */

COMPUTE mn1701=0

COMPUTE mn1702=0

COMPUTE mn1703=0 

COMPUTE faminc_c=0

COMPUTE income_c=-3       

COMPUTE compo1=mil_cur  

COMPUTE compo2=mils_cur       

COMPUTE compo3=wps_cur   

COMPUTE compo4=wpss_cur      

COMPUTE compo5=sei_cur

COMPUTE compo6=seis_cur          

COMPUTE compo7=ui_cur    

COMPUTE compo8=uis_cur                    

COMPUTE compo9=chsp_cur 

COMPUTE compo10=afdc_cur 

COMPUTE compo11=ssi_cur

COMPUTE compo12=ed_cur       

COMPUTE compo13=edss_cur 

COMPUTE compo14=vet_cur     

COMPUTE compo15=other_c

COMPUTE compo16=relwel_c 

COMPUTE compo17=relreg_c

COMPUTE compo18=food_cur 

COMPUTE compo19=chsps_c

COMPUTE compo20=wkcmp_c

do if (wktot99u eq -4 and rctot99u gt 0)     

COMPUTE ui_cur=-3

COMPUTE compo7=-3

else if (wktot99u lt 0 and wktot99u gt -4)     

COMPUTE ui_cur=-3    

COMPUTE compo7=-3

end if

do if (wktot99s eq -4 and rctot99s gt 0)

COMPUTE uis_cur=-3   

COMPUTE compo8=-3

else if (wktot99s lt 0 and wktot99s gt -4)   

COMPUTE uis_cur=-3         

COMPUTE compo8=-3

end if

do if (motot99a eq -4 and rctot99a gt 0)   

COMPUTE afdc_cur=-3        

COMPUTE compo10=-3

else if (motot99a lt 0 and motot99a gt -4)   

COMPUTE afdc_cur=-3  

COMPUTE compo10=-3

end if

 

do if (motot99f eq -4 and rctot99f gt 0) 

COMPUTE food_cur=-3  

COMPUTE compo18=-3

else if (motot99f lt 0 and motot99f gt -4) 

COMPUTE food_cur=-3 

COMPUTE compo18=-3

end if

do if (motot99w eq -4 and rctot99w gt 0)

COMPUTE ssi_cur=-3   

COMPUTE compo11=-3

else if (motot99w lt 0 and motot99w gt -4)     

COMPUTE ssi_cur=-3  

COMPUTE compo11=-3

end if 

do repeat compo=compo1 to compo20

do if (compo > -4)

do if (compo < 0 and compo eq -1)

COMPUTE mn1701=(mn1701+1)

else if (compo < 0 and compo eq -2) 

COMPUTE mn1702=(mn1702+1)

else if (compo < 0 and compo eq -3) 

COMPUTE mn1703=(mn1703+1)

else   

COMPUTE faminc_c=(faminc_c + compo)     .    end if

end if

end repeat print

COMPUTE sumn_cur=mn1701 + mn1702 + mn1703

do if (sumn_cur = 0) 

COMPUTE income_c=faminc_c

else

do if (mn1703 > 0)

COMPUTE income_c=-3

else if (mn1702 > 0)  

COMPUTE income_c=-2

else if (mn1701 > 0)   

COMPUTE income_c=-1   

end if

end if

if (paflaga eq -5) income_c=-5

  /* poverty status and level */

 

do if (income_c > level_c)   

COMPUTE cps_cur=0

else if (income_c >= 0 and income_c <= level_c)

COMPUTE cps_cur=1

else    

COMPUTE cps_cur=-3  

end if

do repeat mn=mn1701 to mn1703

if (mn > 0) mn=1

end repeat print

if (sumn_cur > 0) sumn_cur=1

if (paflaga eq -5) level_c=-5

if (paflaga eq -5) cps_cur=-5

 

2002 Variables

* SAS PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2002;

afdc_cur=-4;

chsp_cur=-4;

chsps_c=-4;

cps_cur=-4;

ed_cur=-4;

edss_cur=-4;

family_c=-4;

faminc_c=-4;

food_cur=-4;

income_c=-4;

level_c=-4;

mil_cur=-4;

mils_cur=-4;

mn1701=-4;

mn1702=-4;

mn1703=-4;

other_c=-4;

ssi_cur=-4;

relreg_c=-4;

relwel_c=-4;

s_cur=-4;

sei_cur=-4;

seis_cur=-4;

sumn_cur=-4;

target_c=-4;

ui_cur=-4;

uis_cur=-4;

vet_cur=-4;

wps_cur=-4;

wpss_cur=-4;

wkcmp_c=-4;

dis_cur=-4;

ss_cur=-4;

 

/* Several variables pertaining to recipiency from various government income programs were computed from                 */

/* a number of different variables in 2001, due to the change to an event history format for data collection.                   */

/* these variables are as follows:                                                                                                                                                 */

/* WKTOT01U = Total number of weeks R received unemployment compensation in calendar year 2001                   */

/* RCTOT01U = Total amount of unemployment compensation R received in calendar year 2001                               */

/* WKTOT01S = Total number of weeks R's spouse received unemployment compensation in calendar year 2001      */

/* RCTOT01U = Total amount of unemployment compensation R's spouse received in calendar year 2001                 */

/* MOTOT01A = Total number of months R or spouse received AFDC payments in calendar year 2001                     */

/* RCTOT01A = Total amount of AFDC R or spouse received in calendar year 2001                                                      */

/* MOTOT01F = Total number of months R or spouse received government food stamps in calendar year 2001         */

/* RCTOT01F = Total amount of government food stamps R or spouse received in calendar year 2001                        */

/* MOTOT01W = Total number of months R or spouse received other welfare or public assistance payments              */

/*                           in calendar year 2001                                                                                                                                 */

/* RCTOT01W = Total amount of other welfare or public assistance payments R or spouse received in                          */

/*                         calendar year 2001                                                                                                                                        */

if (Q13_3 = -4) then mil_cur=0;

else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;

else wps_cur=Q13_5;

if (Q13_9 = -4) then sei_cur=0;

else sei_cur=Q13_9;

 

data compute1;

set compute;

if (wktot01u = -4 & rctot01u = -4) then ui_cur=0;

else if (wktot01u = -4 & rctot01u = 0) then ui_cur=0;

else if (wktot01u > 0 & rctot01u > 0) then ui_cur=rctot01u;

else if (wktot01u < 0) then ui_cur=wktot01u;

else if (rctot01u < 0) then ui_cur=rctot01u;

else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;

else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;

else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;

else seis_cur=Q13_24;

if (paflaga = 1 | (wktot01s = -4 & rctot01s = -4)) then uis_cur=0;

else if (paflaga = 1 | (wktot01s = -4 & rctot01s = 0)) then uis_cur=0;

else if (wktot01s > 0 & rctot01s > 0) then uis_cur=rctot01s;

else if (wktot01s < 0) then uis_cur=wktot01s;

else if (rctot01s < 0) then uis_cur=rctot01s;

else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;

else wkcmp_c=q13_31b;

 

if (Q13_33i = -4) then chsp_cur=0;

else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;

else chsps_c=Q13_33m;

if (rctot01a = -4 | rctot01a = 0) then afdc_cur=0;

else if (motot01a = -4 | motot01a = 0) then afdc_cur=0;

else if (rctot01a < 0) then afdc_cur=rctot01a;

else if (motot01a < 0) then afdc_cur=motot01a;

else if (motot01a <= 0) then afdc_cur=-3;

else afdc_cur=rctot01a;

if (rctot01f = -4 | rctot01f = 0) then food_cur=0;

else if (motot01f = -4 | motot01f = 0) then food_cur=0;

else if (rctot01f < 0) then food_cur=rctot01f;

else if (motot01f < 0) then food_cur=motot01f;

else if (motot01f <= 0) then food_cur=-3;

else food_cur=rctot01f;

if (rctot01w = -4 | rctot01w = 0) then ssi_cur=0;

else if (motot01w = -4 | motot01w = 0) then ssi_cur=0;

else if (rctot01w < 0) then ssi_cur=rctot01w;

else if (motot01w < 0) then ssi_cur=motot01w;

else if (motot01w <= 0) then ssi_cur=-3;

else ssi_cur=rctot01w;

if (Q13_66 = -4) then ed_cur=0;

else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;

else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;

else if (q13_70_v = -2) then vet_cur=q13_70_v;

else if (q13_70_v = -1) then vet_cur=q13_70_v;

else vet_cur=(q13_70_v * 12);

if (q13_70_d = -4) then dis_cur=0;

else if (q13_70_d = -2) then dis_cur=q13_70_d;

else if (q13_70_d = -1) then dis_cur=q13_70_d;

else dis_cur=(q13_70_d * 12);

if (q13_70_s = -4) then ss_cur=0;

else if (q13_70_s = -2) then ss_cur=q13_70_s;

else if (q13_70_s = -1) then ss_cur=q13_70_s;

else ss_cur=(q13_70_s * 12);

if (Q13_75 = -4) then other_c=0;

else other_c=Q13_75;

data compute2;

set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;

else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;

else relreg_c=Q13_92c;

family_c=famsz02;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ02) SEARCH THRU THE HOUSEHOLD ENUMERATION

INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.

DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46

OR (>=50 & <=54)*/

mn1701=0;

mn1702=0;

mn1703=0;

faminc_c=0;

income_c=-3;

compo1=mil_cur;

compo2=mils_cur;

compo3=wps_cur;

compo4=wpss_cur;

compo5=sei_cur;

compo6=seis_cur;

compo7=ui_cur;

compo8=uis_cur;

compo9=chsp_cur;

compo10=afdc_cur;

compo11=ssi_cur;

compo12=ed_cur;

compo13=edss_cur;

compo14=vet_cur;

compo15=other_c;

compo16=relwel_c;

compo17=relreg_c;

compo18=food_cur;

compo19=chsps_c;

compo20=wkcmp_c;

compo21=dis_cur;

compo22=ss_cur;

if (wktot01u = -4 & rctot01u > 0) then do;

ui_cur=-3;

compo7=-3;

end;

else if (wktot01u < 0 & wktot01u > -4) then do;

ui_cur=-3;

compo7=-3;

end;

if (wktot01s = -4 & rctot01s > 0) then do;

uis_cur=-3;

compo8=-3;

end;

else if (wktot01s < 0 & wktot01s > -4) then do;

uis_cur=-3;

compo8=-3;

end;

if (motot01a = -4 & rctot01a > 0) then do;

afdc_cur=-3;

compo10=-3;

end;

else if (motot01a < 0 & motot01a > -4) then do;

afdc_cur=-3;

compo10=-3;

end;

if (motot01f = -4 & rctot01f > 0) then do;

food_cur=-3;

compo18=-3;

end;

else if (motot01f < 0 & motot01f > -4) then do;

food_cur=-3;

compo18=-3;

end;

if (motot01w = -4 & rctot01w > 0) then do;

ssi_cur=-3;

compo11=-3;

end;

else if (motot01w < 0 & motot01w > -4) then do;

ssi_cur=-3;

compo11=-3;

end;

array compo (j) compo1 compo2 compo3 compo4 compo5 compo6 compo7

compo8 compo9 compo10 compo11 compo12 compo13 compo14

compo15 compo16 compo17 compo18 compo19 compo20

compo21 compo22;

do j=1 to 22;

if (compo > -4) then do;

if (compo < 0 & compo = -1) then mn1701=(mn1701+1);

else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);

else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);

else faminc_c=(faminc_c + compo);

end;

end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then income_c=faminc_c;

else do;

if (mn1703 > 0) then income_c=-3;

else if (mn1702 > 0) then income_c=-2;

else if (mn1701 > 0) then income_c=-1;

end;

if (paflaga = -5) then income_c=-5;

proc freq;

tables mn1701 mn1702 mn1703 sumn_cur;

if (income_c > level_c) then cps_cur=0;

else if (income_c >= 0 & income_c <= level_c) then cps_cur=1;

else cps_cur=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;

if (mn > 0) then mn=1;

end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;

if (paflaga = -5) then cps_cur=-5;  

  

2004 Variables

* SAS PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2004;

afdc_cur=-4;

chsp_cur=-4;

chsps_c=-4;

cps_cur=-4;

ed_cur=-4;

edss_cur=-4;

family_c=-4;

faminc_c=-4;

food_cur=-4;

income_c=-4;

level_c=-4;

mil_cur=-4;

mils_cur=-4;

mn1701=-4;

mn1702=-4;

mn1703=-4;

other_c=-4;

ssi_cur=-4;

relreg_c=-4;

relwel_c=-4;

s_cur=-4;

sei_cur=-4;

seis_cur=-4;

sumn_cur=-4;

target_c=-4;

ui_cur=-4;

uis_cur=-4;

vet_cur=-4;

wps_cur=-4;

wpss_cur=-4;

wkcmp_c=-4;

dis_cur=-4;

ss_cur=-4;

* Federal Poverty Guidelines used in 2003 program apply to calendar year;

 

if (Q13_3 = -4) then mil_cur=0;

else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;

else wps_cur=Q13_5;

* new series to incorporate new farm & bus income qs;

fjt_inc=fjt_141;

if (fjt_inc = -4) then farm_cur=0;

else farm_cur=fjt_inc;

bpjt_inc=bp_141;

if (bpjt_inc = -4) then bus_cur=0;

else bus_cur=bpjt_inc;

fbr_inc=q13_132d;

if (fbr_inc = -4) then fbr_cur=0;

else fbr_cur=fbr_inc;

if (Q13_9 = -4) then sei_cur=0;

else sei_cur=Q13_9;

if (farm_cur > 0) then sei_cur=(sei_cur+farm_cur);

if (bus_cur > 0) then sei_cur=(sei_cur+bus_cur);

if (fbr_cur > 0) then sei_cur=(sei_cur+fbr_cur);

data compute1;

set compute;

if (wktot03u = -4 & rctot03u = -4) then ui_cur=0;

else if (wktot03u = -4 & rctot03u = 0) then ui_cur=0;

else if (wktot03u > 0 & rctot03u > 0) then ui_cur=rctot03u;

else if (wktot03u < 0) then ui_cur=wktot03u;

else if (rctot03u < 0) then ui_cur=rctot03u;

else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;

else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;

else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;

else seis_cur=Q13_24;

if (paflaga = 1 | (wktot03s = -4 & rctot03s = -4)) then uis_cur=0;

else if (paflaga = 1 | (wktot03s = -4 & rctot03s = 0)) then uis_cur=0;

else if (wktot03s > 0 & rctot03s > 0) then uis_cur=rctot03s;

else if (wktot03s < 0) then uis_cur=wktot03s;

else if (rctot03s < 0) then uis_cur=rctot03s;

else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;

else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;

else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;

else chsps_c=Q13_33m;

if (rctot03a = -4 | rctot03a = 0) then afdc_cur=0;

else if (motot03a = -4 | motot03a = 0) then afdc_cur=0;

else if (rctot03a < 0) then afdc_cur=rctot03a;

else if (motot03a < 0) then afdc_cur=motot03a;

else if (motot03a <= 0) then afdc_cur=-3;

else afdc_cur=rctot03a;

if (rctot03f = -4 | rctot03f = 0) then food_cur=0;

else if (motot03f = -4 | motot03f = 0) then food_cur=0;

else if (rctot03f < 0) then food_cur=rctot03f;

else if (motot03f < 0) then food_cur=motot03f;

else if (motot03f <= 0) then food_cur=-3;

else food_cur=rctot03f;

if (rctot03w = -4 | rctot03w = 0) then ssi_cur=0;

else if (motot03w = -4 | motot03w = 0) then ssi_cur=0;

else if (rctot03w < 0) then ssi_cur=rctot03w;

else if (motot03w < 0) then ssi_cur=motot03w;

else if (motot03w <= 0) then ssi_cur=-3;

else ssi_cur=rctot03w;

if (Q13_66 = -4) then ed_cur=0;

else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;

else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;

else if (q13_70_v = -2) then vet_cur=q13_70_v;

else if (q13_70_v = -1) then vet_cur=q13_70_v;

else vet_cur=(q13_70_v * 12);

if (q13_70_d = -4) then dis_cur=0;

else if (q13_70_d = -2) then dis_cur=q13_70_d;

else if (q13_70_d = -1) then dis_cur=q13_70_d;

else dis_cur=(q13_70_d * 12);

if (q13_70_s = -4) then ss_cur=0;

else if (q13_70_s = -2) then ss_cur=q13_70_s;

else if (q13_70_s = -1) then ss_cur=q13_70_s;

else ss_cur=(q13_70_s * 12);

if (Q13_75 = -4) then other_c=0;

else other_c=Q13_75;

data compute2;

set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;

else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;

else relreg_c=Q13_92c;

family_c=famsz04;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ04) SEARCH THRU THE HOUSEHOLD ENUMERATION

INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.

DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR

(>=50 & <=54)*/

mn1701=0;

mn1702=0;

mn1703=0;

faminc_c=0;

income_c=-3;

compo1=mil_cur;

compo2=mils_cur;

compo3=wps_cur;

compo4=wpss_cur;

compo5=sei_cur;

compo6=seis_cur;

compo7=ui_cur;

compo8=uis_cur;

compo9=chsp_cur;

compo10=afdc_cur;

compo11=ssi_cur;

compo12=ed_cur;

compo13=edss_cur;

compo14=vet_cur;

compo15=other_c;

compo16=relwel_c;

compo17=relreg_c;

compo18=food_cur;

compo19=chsps_c;

compo20=wkcmp_c;

compo21=dis_cur;

compo22=ss_cur;

if (wktot03u = -4 & rctot03u > 0) then do;

ui_cur=-3;

compo7=-3;

end;

else if (wktot03u < 0 & wktot03u > -4) then do;

ui_cur=-3;

compo7=-3;

end;

 

if (wktot03s = -4 & rctot03s > 0) then do;

uis_cur=-3;

compo8=-3;

end;

else if (wktot03s < 0 & wktot03s > -4) then do;

uis_cur=-3;

compo8=-3;

end;

if (motot03a = -4 & rctot03a > 0) then do;

afdc_cur=-3;

compo10=-3;

end;

else if (motot03a < 0 & motot03a > -4) then do;

afdc_cur=-3;

compo10=-3;

end;

if (motot03f = -4 & rctot03f > 0) then do;

food_cur=-3;

compo18=-3;

end;

else if (motot03f < 0 & motot03f > -4) then do;

food_cur=-3;

compo18=-3;

end;

if (motot03w = -4 & rctot03w > 0) then do;

ssi_cur=-3;

compo11=-3;

end;

else if (motot03w < 0 & motot03w > -4) then do;

ssi_cur=-3;

compo11=-3;

end;

array compo (j) compo1 compo2 compo3 compo4 compo5 compo6 compo7

compo8 compo9 compo10 compo11 compo12 compo13 compo14

compo15 compo16 compo17 compo18 compo19 compo20

compo21 compo22;

do j=1 to 22;

if (compo > -4) then do;

if (compo < 0 & compo = -1) then mn1701=(mn1701+1);

else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);

else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);

else faminc_c=(faminc_c + compo);

end;

end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then income_c=faminc_c;

else do;

if (mn1703 > 0) then income_c=-3;

else if (mn1702 > 0) then income_c=-2;

else if (mn1701 > 0) then income_c=-1;

end;

if (paflaga = -5) then income_c=-5;

proc freq; tables vet_cur other_c;

proc freq;

tables mn1701 mn1702 mn1703 sumn_cur;

data truncate;

set compute2;

if (income_c >= 250200);

data compute3;

set compute2;

incom_ct=income_c;

if (income_c >= 250200) then incom_ct=408473;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;

if (mn > 0) then mn=1;

end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;

if (paflaga = -5) then cps_cur=-5;

 

2006 Variables

Total Net Family Income and Poverty Status in Calendar Year 2005 Incorporating Estimates

In the 2006 interview, respondents who didn’t know many specific income amounts were asked to estimate those amounts using self-reported ranges and if necessary, unfolding brackets. Respondents who refused to report many specific income amounts were asked unfolding bracket questions as well (see for example T09123.00 - T09131.00). The Total Net Family Income variable for calendar year 2005 (T09878.00) incorporates these estimates. The mid-point of self-reported ranges was used if available. Similarly, the mid-point of unfolding brackets were used where necessary and available. If a respondent reported that an income value was higher than the high bracket, the mean of valid values reported above the high bracket was used. For example, if a respondent reported that an income value was higher than the high bracket, and the high bracket was $50,000, the mean of all valid values reported over $50,000 was assigned.

The Poverty Status variable for calendar year 2005 (T09879.00) is created using the enhanced Total Net Family Income variable described above. Using these estimates where available significantly reduces the magnitude of non-response in both the Total Net Family Income and Poverty Status variables.

The decision rules for using estimates in individual income items are as follows:

If self-reported ranges are given and (example T09126.00, T09128.00):

upper/lower values are in proper order, midpoint is used;

ranges are given backwards, the values are reversed and midpoint is used;

the same value is given for upper/lower self-reported range value, that single value is used;

If unfolding brackets are answered (low bracket < entry value < high bracket) and (example T09129.00-T09131.00):

r reports less than entry value and less than low bracket, then half of low bracket value is used (midpoint between low bracket and 0)

r reports less than entry value but greater than low bracket value, midpoint between low bracket and entry value is used;

r reports greater than entry value but less than high bracket value, midpoint between entry value and high bracket is used;

r reports greater than entry value and greater than high bracket value, the mean of valid responses above the high bracket value is used.

weight06=1;
if curyr=-4 then weight06=0;

* add to paflag for any missed;

paflaga = paflag;
if (rel01 = 33 | rel02 = 33 | rel03 = 33 | rel04 = 33 | rel05 = 33
| rel06 = 33 | rel07 = 33 | rel08 = 33 | rel09 = 33 | rel10 = 33
| rel11 = 33 | rel12 = 33 | rel13 = 33 | rel14 = 33
| rel15 = 33) then paflaga=1;
if (paflaga = .) then paflaga=-5;

spflaga = 0;
if (rel01 = 1 | rel02 = 1 | rel03 = 1 | rel04 = 1 | rel05 = 1
| rel06 = 1 | rel07 = 1 | rel08 = 1 | rel09 = 1 | rel10 = 1
| rel11 = 1 | rel12 = 1 | rel13 = 1 | rel14 = 1
| rel15 = 1) then spflaga=1;

if (spflag = .) then spflag=-5;
if (spflag = -5) then spflaga=-5;

* compute recipiency variables;

rctot05u = ucdol105;
if (paflaga = -5) then rctot05u=-5;

if (ucdol105 = .) then rctot05u=-4;
if (ucdol105 = .) then wktot05u=-4;

wktot05u = 0;
if (dujn0605 > 0) then wktot05u=4.3;
if (dufb0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dumr0605 > 0) then wktot05u=(wktot05u + 4.3);
if (duar0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dumy0605 > 0) then wktot05u=(wktot05u + 4.3);
if (duju0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dujl0605 > 0) then wktot05u=(wktot05u + 4.3);
if (duag0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dusp0605 > 0) then wktot05u=(wktot05u + 4.3);
if (duot0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dunv0605 > 0) then wktot05u=(wktot05u + 4.3);
if (dudc0605 > 0) then wktot05u=(wktot05u + 4.3);
if (wktot05u = 0) then wktot05u=-4;
if (paflaga = -5) then wktot05u=-5;

rctot05s = spdol105;
if (paflaga = -5) then rctot05s=-5;

if (spdol105 = .) then rctot05s=-4;
if (spdol105 = .) then wktot05s=-4;

wktot05s = 0;
if (tsjn0605 > 0) then wktot05s=4.3;
if (tsfb0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsmr0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsar0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsmy0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsju0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsjl0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsag0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tssp0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsot0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsnv0605 > 0) then wktot05s=(wktot05s + 4.3);
if (tsdc0605 > 0) then wktot05s=(wktot05s + 4.3);
if (wktot05s = 0) then wktot05s=-4;
if (paflaga = -5) then wktot05s=-5;

rctot05w = ssdol105;
if (paflaga = -5) then rctot05w=-5;

if (ssdol105 = .) then rctot05w=-4;
if (ssdol105 = .) then wktot05w=-4;

motot05w = 0;
if (dsjn0605 > 0) then motot05w=1;
if (dsfb0605 > 0) then motot05w=(motot05w + 1);
if (dsmr0605 > 0) then motot05w=(motot05w + 1);
if (dsar0605 > 0) then motot05w=(motot05w + 1);
if (dsmy0605 > 0) then motot05w=(motot05w + 1);
if (dsju0605 > 0) then motot05w=(motot05w + 1);
if (dsjl0605 > 0) then motot05w=(motot05w + 1);
if (dsag0605 > 0) then motot05w=(motot05w + 1);
if (dssp0605 > 0) then motot05w=(motot05w + 1);
if (dsot0605 > 0) then motot05w=(motot05w + 1);
if (dsnv0605 > 0) then motot05w=(motot05w + 1);
if (dsdc0605 > 0) then motot05w=(motot05w + 1);
if (motot05w = 0) then motot05w=-4;
if (paflaga = -5) then motot05w=-5;

rctot05a = adol105;
if (paflaga = -5) then rctot05a=-5;

if (adol105 = .) then rctot05a=-4;
if (adol105 = .) then wktot05a=-4;

motot05a = 0;
if (dajn0605 > 0) then motot05a=1;
if (dafb0605 > 0) then motot05a=(motot05a + 1);
if (damr0605 > 0) then motot05a=(motot05a + 1);
if (daar0605 > 0) then motot05a=(motot05a + 1);
if (damy0605 > 0) then motot05a=(motot05a + 1);
if (daju0605 > 0) then motot05a=(motot05a + 1);
if (dajl0605 > 0) then motot05a=(motot05a + 1);
if (daag0605 > 0) then motot05a=(motot05a + 1);
if (dasp0605 > 0) then motot05a=(motot05a + 1);
if (daot0605 > 0) then motot05a=(motot05a + 1);
if (danv0605 > 0) then motot05a=(motot05a + 1);
if (dadc0605 > 0) then motot05a=(motot05a + 1);
if (motot05a = 0) then motot05a=-4;
if (paflaga = -5) then motot05a=-5;

rctot05f = fsdol105;
if (paflaga = -5) then rctot05f=-5;

if (fsdol105 = .) then rctot05f=-4;
if (fsdol105 = .) then wktot05f=-4;

motot05f = 0;
if (dfjn0605 > 0) then motot05f=1 ;
if (dffb0605 > 0) then motot05f=(motot05f + 1);
if (dfmr0605 > 0) then motot05f=(motot05f + 1);
if (dfar0605 > 0) then motot05f=(motot05f + 1);
if (dfmy0605 > 0) then motot05f=(motot05f + 1);
if (dfju0605 > 0) then motot05f=(motot05f + 1);
if (dfjl0605 > 0) then motot05f=(motot05f + 1);
if (dfag0605 > 0) then motot05f=(motot05f + 1);
if (dfsp0605 > 0) then motot05f=(motot05f + 1);
if (dfot0605 > 0) then motot05f=(motot05f + 1);
if (dfnv0605 > 0) then motot05f=(motot05f + 1);
if (dfdc0605 > 0) then motot05f=(motot05f + 1);
if (motot05f = 0) then motot05f=-4;
if (paflaga = -5) then motot05f=-5;

* PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2005;

afdc_cur=-4;
chsp_cur=-4;
chsps_c=-4;
cps_cur=-4;
ed_cur=-4;
edss_cur=-4;
family_c=-4;
faminc_c=-4;
food_cur=-4;
income_c=-4;
level_c=-4;
mil_cur=-4;
mils_cur=-4;
mn1701=-4;
mn1702=-4;
mn1703=-4;
other_c=-4;
ssi_cur=-4;
relreg_c=-4;
relwel_c=-4;
s_cur=-4;
sei_cur=-4;
seis_cur=-4;
sumn_cur=-4;
target_c=-4;
ui_cur=-4;
uis_cur=-4;
vet_cur=-4;
wps_cur=-4;
wpss_cur=-4;
wkcmp_c=-4;
dis_cur=-4;
ss_cur=-4;

* Poverty status and level

s_cur=1;

if (Q13_3 = -4) then mil_cur=0;
else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;
else wps_cur=Q13_5;

if (Q13_9 = -4) then sei_cur=0;
else sei_cur=Q13_9;

proc sort; by id;

data compute1;
set compute;
if (wktot05u = -4 & rctot05u = -4) then ui_cur=0;
else if (wktot05u = -4 & rctot05u = 0) then ui_cur=0;
else if (wktot05u > 0 & rctot05u > 0) then ui_cur=rctot05u;
else if (wktot05u < 0) then ui_cur=wktot05u;
else if (rctot05u < 0) then ui_cur=rctot05u;
else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;
else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;
else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;
else seis_cur=Q13_24;

if (paflaga = 1 | (wktot05s = -4 & rctot05s = -4)) then uis_cur=0;
else if (paflaga = 1 | (wktot05s = -4 & rctot05s = 0)) then uis_cur=0;
else if (wktot05s > 0 & rctot05s > 0) then uis_cur=rctot05s;
else if (wktot05s < 0) then uis_cur=wktot05s;
else if (rctot05s < 0) then uis_cur=rctot05s;
else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;
else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;
else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;
else chsps_c=Q13_33m;

if (rctot05a = -4 | rctot05a = 0) then afdc_cur=0;
else if (motot05a = -4 | motot05a = 0) then afdc_cur=0;
else if (rctot05a < 0) then afdc_cur=rctot05a;
else if (motot05a < 0) then afdc_cur=motot05a;
else if (motot05a <= 0) then afdc_cur=-3;
else afdc_cur=rctot05a;

if (rctot05f = -4 | rctot05f = 0) then food_cur=0;
else if (motot05f = -4 | motot05f = 0) then food_cur=0;
else if (rctot05f < 0) then food_cur=rctot05f;
else if (motot05f < 0) then food_cur=motot05f;
else if (motot05f <= 0) then food_cur=-3;
else food_cur=rctot05f;

if (rctot05w = -4 | rctot05w = 0) then ssi_cur=0;
else if (motot05w = -4 | motot05w = 0) then ssi_cur=0;
else if (rctot05w < 0) then ssi_cur=rctot05w;
else if (motot05w < 0) then ssi_cur=motot05w;
else if (motot05w <= 0) then ssi_cur=-3;
else ssi_cur=rctot05w;

if (Q13_66 = -4) then ed_cur=0;
else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;
else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;
else if (q13_70_v = -2) then vet_cur=q13_70_v;
else if (q13_70_v = -1) then vet_cur=q13_70_v;
else vet_cur=(q13_70_v * 12);

if (q13_70_d = -4) then dis_cur=0;
else if (q13_70_d = -2) then dis_cur=q13_70_d;
else if (q13_70_d = -1) then dis_cur=q13_70_d;
else dis_cur=(q13_70_d * 12);

if (q13_70_s = -4) then ss_cur=0;
else if (q13_70_s = -2) then ss_cur=q13_70_s;
else if (q13_70_s = -1) then ss_cur=q13_70_s;
else ss_cur=(q13_70_s * 12);

if (Q13_75 = -4) then other_c=0;
else other_c=Q13_75;

data compute2;
set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;
else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;
else relreg_c=Q13_92c;

family_c=famsz06;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ04) SEARCH THRU THE HOUSEHOLD ENUMERATION
INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.
DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR
(>=50 & <=54)*/

mn1701=0;
mn1702=0;
mn1703=0;
faminc_c=0;
income_c=-3;
compo1=mil_cur;
compo2=mils_cur;
compo3=wps_cur;
compo4=wpss_cur;
compo5=sei_cur;
compo6=seis_cur;
compo7=ui_cur;
compo8=uis_cur;
compo9=chsp_cur;
compo10=afdc_cur;
compo11=ssi_cur;
compo12=ed_cur;
compo13=edss_cur;
compo14=vet_cur;
compo15=other_c;
compo16=relwel_c;
compo17=relreg_c;
compo18=food_cur;
compo19=chsps_c;
compo20=wkcmp_c;
compo21=dis_cur;
compo22=ss_cur;

if (wktot05u = -4 & rctot05u > 0) then do;
ui_cur=-3;
compo7=-3;
end;
else if (wktot05u < 0 & wktot05u > -4) then do;
ui_cur=-3;
compo7=-3;
end;

if (wktot05s = -4 & rctot05s > 0) then do;
uis_cur=-3;
compo8=-3;
end;
else if (wktot05s < 0 & wktot05s > -4) then do;
uis_cur=-3;
compo8=-3;
end;

if (motot05a = -4 & rctot05a > 0) then do;
afdc_cur=-3;
compo10=-3;
end;
else if (motot05a < 0 & motot05a > -4) then do;
afdc_cur=-3;
compo10=-3;
end;

if (motot05f = -4 & rctot05f > 0) then do;
food_cur=-3;
compo18=-3;
end;
else if (motot05f < 0 & motot05f > -4) then do;
food_cur=-3;
compo18=-3;
end;

if (motot05w = -4 & rctot05w > 0) then do;
ssi_cur=-3;
compo11=-3;
end;
else if (motot05w < 0 & motot05w > -4) then do;
ssi_cur=-3;
compo11=-3;
end;

array compo (j) compo1 compo2 compo3 compo4 compo5 compo6 compo7
compo8 compo9 compo10 compo11 compo12 compo13 compo14
compo15 compo16 compo17 compo18 compo19 compo20
compo21 compo22;

do j=1 to 22;
if (compo > -4) then do;
if (compo < 0 & compo = -1) then mn1701=(mn1701+1);
else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);
else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);
else faminc_c=(faminc_c + compo);
end;
end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then income_c=faminc_c;
else do;
if (mn1703 > 0) then income_c=-3;
else if (mn1702 > 0) then income_c=-2;
else if (mn1701 > 0) then income_c=-1;
end;

if (paflaga = -5) then income_c=-5;

data compute3;
set compute2;
incom_ct=income_c;
if (income_c >= 279000) then incom_ct=527631;

if (income_c > level_c) then cps_cur=0;
else if (income_c >= 0 & income_c <= level_c) then cps_cur=1;
else cps_cur=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;
if (mn > 0) then mn=1;
end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;
if (paflaga = -5) then cps_cur=-5;

 

2008 Variables

* PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2007;
 

afdc_cur=-4;
chsp_cur=-4;
chsps_c=-4;
cps_cur=-4;
ed_cur=-4;
edss_cur=-4;
family_c=-4;
faminc_c=-4;
food_cur=-4;
income_c=-4;
level_c=-4;
mil_cur=-4;
mils_cur=-4;
mn1701=-4;
mn1702=-4;
mn1703=-4;
other_c=-4;
ssi_cur=-4;
relreg_c=-4;
relwel_c=-4;
s_cur=-4;
sei_cur=-4;
seis_cur=-4;
sumn_cur=-4;
target_c=-4;
ui_cur=-4;
uis_cur=-4;
vet_cur=-4;
wps_cur=-4;
wpss_cur=-4;
wkcmp_c=-4;
dis_cur=-4;
ss_cur=-4;

if (Q13_3 = -4) then mil_cur=0;
else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;
else wps_cur=Q13_5;

fjt_inc=fjt_141;

if (fjt_inc = -4) then farm_cur=0;

                    else farm_cur=fjt_inc;

bpjt_inc=bp_141;
if (bpjt_inc = -4) then bus_cur=0;

                    else bus_cur=bpjt_inc;

fbr_inc=q13_132d;
if (fbr_inc = -4) then fbr_cur=0;

                    else fbr_cur=fbr_inc;

if (Q13_9 = -4) then sei_cur=0;
                    else sei_cur=Q13_9;

if (farm_cur > 0) then sei_cur=(sei_cur+farm_cur);
if (bus_cur > 0)  then sei_cur=(sei_cur+bus_cur);
if (fbr_cur > 0)  then sei_cur=(sei_cur+fbr_cur);

proc sort; by id;

data compute1;
set compute;

if (wktot07u = -4 & rctot07u = -4) then ui_cur=0;
else if (wktot07u = -4 & rctot07u = 0) then ui_cur=0;
else if (wktot07u > 0 & rctot07u > 0) then ui_cur=rctot07u;
else if (wktot07u < 0) then ui_cur=wktot07u;
else if (rctot07u < 0) then ui_cur=rctot07u;
else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;
else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;
else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;
else seis_cur=Q13_24;

if (paflaga = 1 | (wktot07s = -4 & rctot07s = -4)) then uis_cur=0;
else if (paflaga = 1 | (wktot07s = -4 & rctot07s = 0)) then uis_cur=0;
else if (wktot07s > 0 & rctot07s > 0) then uis_cur=rctot07s;
else if (wktot07s < 0) then uis_cur=wktot07s;
else if (rctot07s < 0) then uis_cur=rctot07s;
else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;
else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;
else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;
else chsps_c=Q13_33m;

if (rctot07a = -4 | rctot07a = 0) then afdc_cur=0;
else if (motot07a = -4 | motot07a = 0) then afdc_cur=0;
else if (rctot07a < 0) then afdc_cur=rctot07a;
else if (motot07a < 0) then afdc_cur=motot07a;
else if (motot07a <= 0) then afdc_cur=-3;
else afdc_cur=rctot07a;

if (rctot07f = -4 | rctot07f = 0) then food_cur=0;
else if (motot07f = -4 | motot07f = 0) then food_cur=0;
else if (rctot07f < 0) then food_cur=rctot07f;
else if (motot07f < 0) then food_cur=motot07f;
else if (motot07f <= 0) then food_cur=-3;
else food_cur=rctot07f;

if (rctot07w = -4 | rctot07w = 0) then ssi_cur=0;
else if (motot07w = -4 | motot07w = 0) then ssi_cur=0;
else if (rctot07w < 0) then ssi_cur=rctot07w;
else if (motot07w < 0) then ssi_cur=motot07w;
else if (motot07w <= 0) then ssi_cur=-3;
else ssi_cur=rctot07w;

if (Q13_66 = -4) then ed_cur=0;
else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;
else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;
else if (q13_70_v = -2) then vet_cur=q13_70_v;
else if (q13_70_v = -1) then vet_cur=q13_70_v;
else vet_cur=(q13_70_v * q13_70a_v);*replaced 12 by q13_70a_v;

if (q13_70_d = -4) then dis_cur=0;
else if (q13_70_d = -2) then dis_cur=q13_70_d;
else if (q13_70_d = -1) then dis_cur=q13_70_d;
else dis_cur=(q13_70_d * q13_70a_d);*replaced 12 by q13_70a_d;

 if (q13_70_s = -4) then ss_cur=0;
else if (q13_70_s = -2) then ss_cur=q13_70_s;
else if (q13_70_s = -1) then ss_cur=q13_70_s;
else ss_cur=(q13_70_s * q13_70a_s);*replaced 12 by q13_70a_s;

 if (Q13_75 = -4) then other_c=0;
else other_c=Q13_75;

data compute2;
set compute1;

 if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

 if (Q13_92 = -4) then relwel_c=0;
else relwel_c=Q13_92;

 if (Q13_92c = -4) then relreg_c=0;
else relreg_c=Q13_92c;

 family_c=famsz08;

 /* TO CREATE FAMILY SIZE (I.E. FAMSZ08) SEARCH THRU THE HOUSEHOLD ENUMERATION INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.  DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR (>=50 & <=54)*/

mn1701=0;
mn1702=0;
mn1703=0;
faminc_c=0;
income_c=-3;
compo1=mil_cur;
compo2=mils_cur;
compo3=wps_cur;
compo4=wpss_cur;
compo5=sei_cur;
compo6=seis_cur;
compo7=ui_cur;
compo8=uis_cur;
compo9=chsp_cur;
compo10=afdc_cur;
compo11=ssi_cur;
compo12=ed_cur;
compo13=edss_cur;
compo14=vet_cur;
compo15=other_c;
compo16=relwel_c;
compo17=relreg_c;
compo18=food_cur;
compo19=chsps_c;
compo20=wkcmp_c;
compo21=dis_cur;
compo22=ss_cur;
 

if (wktot07u = -4 & rctot07u > 0) then do;

        ui_cur=-3;

        compo7=-3;

        end;

else if (wktot07u < 0 & wktot07u > -4) then do;

        ui_cur=-3;

        compo7=-3;

        end;

if (wktot07s = -4 & rctot07s > 0) then do;

        uis_cur=-3;

        compo8=-3;

        end;

else if (wktot07s < 0 & wktot07s > -4) then do;

        uis_cur=-3;

        compo8=-3;

        end;

if (motot07a = -4 & rctot07a > 0) then do;

        afdc_cur=-3;

        compo10=-3;

        end;

else if (motot07a < 0 & motot07a > -4) then do;

        afdc_cur=-3;

        compo10=-3;

        end;

 if (motot07f = -4 & rctot07f > 0) then do;

        food_cur=-3;

        compo18=-3;

        end;

else if (motot07f < 0 & motot07f > -4) then do;

        food_cur=-3;

        compo18=-3;

        end;

 if (motot07w = -4 & rctot07w > 0) then do;

        ssi_cur=-3;

        compo11=-3;

        end;

else if (motot07w < 0 & motot07w > -4) then do;

        ssi_cur=-3;

        compo11=-3;

        end;

 array compo (j) compo1  compo2  compo3  compo4  compo5  compo6  compo7

                compo8  compo9  compo10 compo11 compo12 compo13 compo14

                compo15 compo16 compo17 compo18 compo19 compo20

                compo21 compo22;

 do j=1 to 22;

  if (compo > -4) then do;

    if (compo < 0 & compo = -1) then mn1701=(mn1701+1);

    else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);

    else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);

    else faminc_c=(faminc_c + compo);

  end;

end;

 sumn_cur=mn1701 + mn1702 + mn1703;

 if (sumn_cur = 0) then income_c=faminc_c;

else do;

  if (mn1703 > 0) then income_c=-3;

   else if (mn1702 > 0) then income_c=-2;

   else if (mn1701 > 0) then income_c=-1;

end;

if (paflaga = -5) then income_c=-5;

data compute3;

set compute2;

incom_ct=income_c;

if (income_c >= 278000) then incom_ct=454737;

if (income_c > level_c) then cps_cur=0;

else if (income_c >= 0 & income_c <= level_c) then cps_cur=1;

else cps_cur=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;

if (mn > 0) then mn=1;

end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;

if (paflaga = -5) then cps_cur=-5;

 

2010 Variables

* PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2009;

afdc_cur=-4;
chsp_cur=-4;
chsps_c=-4;
povstatus=-4;
ed_cur=-4;
edss_cur=-4;
family_c=-4;
faminc_c=-4;
food_cur=-4;
tnfi=-4;
povlevel=-4;
mil_cur=-4;
mils_cur=-4;
mn1701=-4;
mn1702=-4;
mn1703=-4;
other_c=-4;
ssi_cur=-4;
relreg_c=-4;
relwel_c=-4;
s_cur=-4;
sei_cur=-4;
seis_cur=-4;
sumn_cur=-4;
target_c=-4;
ui_cur=-4;
uis_cur=-4;
vet_cur=-4;
wps_cur=-4;
wpss_cur=-4;
wkcmp_c=-4;
dis_cur=-4;
ss_cur=-4;

 

if (Q13_5 = -4) then wps_cur=0;

else wps_cur=Q13_5;

if (Q13_9 = -4) then sei_cur=0;

               else sei_cur=Q13_9;

proc sort; by public_id;

data compute1;

set compute;

if (wktot09u = -4 & rctot09u = -4) then ui_cur=0;

else if (wktot09u = -4 & rctot09u = 0) then ui_cur=0;

else if (wktot09u > 0 & rctot09u > 0) then ui_cur=rctot09u;

else if (wktot09u < 0) then ui_cur=wktot09u;

else if (rctot09u < 0) then ui_cur=rctot09u;

else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;

else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;

else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;

else seis_cur=Q13_24;

if (paflaga = 1 | (wktot09s = -4 & rctot09s = -4)) then uis_cur=0;

else if (paflaga = 1 | (wktot09s = -4 & rctot09s = 0)) then uis_cur=0;

else if (wktot09s > 0 & rctot09s > 0) then uis_cur=rctot09s;

else if (wktot09s < 0) then uis_cur=wktot09s;

else if (rctot09s < 0) then uis_cur=rctot09s;

else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;

else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;

else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;

else chsps_c=Q13_33m;

if (rctot09a = -4 | rctot09a = 0) then afdc_cur=0;

else if (motot09a = -4 | motot09a = 0) then afdc_cur=0;

else if (rctot09a < 0) then afdc_cur=rctot09a;

else if (motot09a < 0) then afdc_cur=motot09a;

else if (motot09a <= 0) then afdc_cur=-3;

else afdc_cur=rctot09a;

if (rctot09f = -4 | rctot09f = 0) then food_cur=0;

else if (motot09f = -4 | motot09f = 0) then food_cur=0;

else if (rctot09f < 0) then food_cur=rctot09f;

else if (motot09f < 0) then food_cur=motot09f;

else if (motot09f <= 0) then food_cur=-3;

else food_cur=rctot09f;

if (rctot09w = -4 | rctot09w = 0) then ssi_cur=0;

else if (motot09w = -4 | motot09w = 0) then ssi_cur=0;

else if (rctot09w < 0) then ssi_cur=rctot09w;

else if (motot09w < 0) then ssi_cur=motot09w;

else if (motot09w <= 0) then ssi_cur=-3;

else ssi_cur=rctot09w;

if (Q13_66 = -4) then ed_cur=0;

else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;

else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;

else if (q13_70_v = -2) then vet_cur=q13_70_v;

else if (q13_70_v = -1) then vet_cur=q13_70_v;

else vet_cur=(q13_70_v * q13_70a_v);*replaced 12 by q13_70a_v;

if (q13_70_d = -4) then dis_cur=0;

else if (q13_70_d = -2) then dis_cur=q13_70_d;

else if (q13_70_d = -1) then dis_cur=q13_70_d;

else dis_cur=(q13_70_d * q13_70a_d);*replaced 12 by q13_70a_d;

if (q13_70_s = -4) then ss_cur=0;

else if (q13_70_s = -2) then ss_cur=q13_70_s;

else if (q13_70_s = -1) then ss_cur=q13_70_s;

else ss_cur=(q13_70_s * q13_70a_s);*replaced 12 by q13_70a_s;

if (Q13_75 = -4) then other_c=0;

else other_c=Q13_75;

data compute2;

set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;

else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;

else relreg_c=Q13_92c;

family_c=famsz10;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ04) SEARCH THRU THE HOUSEHOLD ENUMERATION

  INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.

  DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR

  (>=50 & <=54)*/

mn1701=0;
mn1702=0;
mn1703=0;
faminc_c=0;
tnfi=-3;
compo1=mil_cur;
compo2=mils_cur;
compo3=wps_cur;
compo4=wpss_cur;
compo5=sei_cur;
compo6=seis_cur;
compo7=ui_cur;
compo8=uis_cur;
compo9=chsp_cur;
compo10=afdc_cur;
compo11=ssi_cur;
compo12=ed_cur;
compo13=edss_cur;
compo14=vet_cur;
compo15=other_c;
compo16=relwel_c;
compo17=relreg_c;
compo18=food_cur;
compo19=chsps_c;
compo20=wkcmp_c;
compo21=dis_cur;
compo22=ss_cur;
 

if (wktot09u = -4 & rctot09u > 0) then do;

        ui_cur=-3;

        compo7=-3;

        end;

else if (wktot09u < 0 & wktot09u > -4) then do;

        ui_cur=-3;

        compo7=-3;

        end;

if (wktot09s = -4 & rctot09s > 0) then do;

        uis_cur=-3;

        compo8=-3;

        end;

else if (wktot09s < 0 & wktot09s > -4) then do;

        uis_cur=-3;

        compo8=-3;

        end;

if (motot09a = -4 & rctot09a > 0) then do;

        afdc_cur=-3;

        compo10=-3;

        end;

else if (motot09a < 0 & motot09a > -4) then do;

        afdc_cur=-3;

        compo10=-3;

        end;

if (motot09f = -4 & rctot09f > 0) then do;

        food_cur=-3;

        compo18=-3;

        end;

else if (motot09f < 0 & motot09f > -4) then do;

        food_cur=-3;

        compo18=-3;

        end;

if (motot09w = -4 & rctot09w > 0) then do;

        ssi_cur=-3;

        compo11=-3;

        end;

else if (motot09w < 0 & motot09w > -4) then do;

        ssi_cur=-3;

        compo11=-3;

        end;

array compo (j) compo1  compo2  compo3  compo4  compo5  compo6  compo7

                compo8  compo9  compo10 compo11 compo12 compo13 compo14

                compo15 compo16 compo17 compo18 compo19 compo20

                compo21 compo22;

do j=1 to 22;

  if (compo > -4) then do;

    if (compo < 0 & compo = -1) then mn1701=(mn1701+1);

    else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);

    else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);

    else faminc_c=(faminc_c + compo);

  end;

end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then tnfi=faminc_c;

else do;

  if (mn1703 > 0) then tnfi=-3;

   else if (mn1702 > 0) then tnfi=-2;

   else if (mn1701 > 0) then tnfi=-1;

end;

if (paflaga = -5) then tnfi=-5;

proc freq; tables sei_cur seis_cur;

run;

proc print; var public_id sei_cur seis_cur;

where (0<sei_cur<100 or 0<seis_cur<100);

title 'sei_cur and seis_cur <100';

title;

proc freq;  

tables mn1701 mn1702 mn1703 sumn_cur;

* income trunc;

data compute3;

set compute2;

 

tnfi_trunc=tnfi;

if (tnfi >= 270200) then tnfi_trunc=440692;

if (tnfi > povlevel) then povstatus=0;

else if (tnfi >= 0 & tnfi <= povlevel) then povstatus=1;

else povstatus=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;

if (mn > 0) then mn=1;

end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then povlevel=-5;

if (paflaga = -5) then povstatus=-5;

 

2012 Variables

* PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2011;

afdc_cur=-4;
chsp_cur=-4;
chsps_c=-4;
cps_cur=-4;
ed_cur=-4;
edss_cur=-4;
family_c=-4;
faminc_c=-4;
food_cur=-4;
tnfi=-4;
level_c=-4;
mil_cur=-4;
mils_cur=-4;
mn1701=-4;
mn1702=-4;
mn1703=-4;
other_c=-4;
ssi_cur=-4;
relreg_c=-4;
relwel_c=-4;
s_cur=-4;
sei_cur=-4;
seis_cur=-4;
sumn_cur=-4;
target_c=-4;
ui_cur=-4;
uis_cur=-4;
vet_cur=-4;
wps_cur=-4;
wpss_cur=-4;
wkcmp_c=-4;
dis_cur=-4;
ss_cur=-4;

if (Q13_3 = -4) then mil_cur=0;
else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;
else wps_cur=Q13_5;

fjt_inc=fjt_141;

if (fjt_inc = -4) then farm_cur=0;
    else farm_cur=fjt_inc;

bpjt_inc=bp_141;

if (bpjt_inc = -4) then bus_cur=0;
    else bus_cur=bpjt_inc;

fbr_inc=q13_132d;
if (fbr_inc = -4) then fbr_cur=0;
    else fbr_cur=fbr_inc;

if (Q13_9 = -4) then sei_cur=0;
    else sei_cur=Q13_9;

if (farm_cur > 0) then sei_cur=(sei_cur+farm_cur);
if (bus_cur > 0) then sei_cur=(sei_cur+bus_cur);
if (fbr_cur > 0) then sei_cur=(sei_cur+fbr_cur);

data compute1;
set compute;
if (wktot11u = -4 & rctot11u = -4) then ui_cur=0;
else if (wktot11u = -4 & rctot11u = 0) then ui_cur=0;
else if (wktot11u > 0 & rctot11u > 0) then ui_cur=rctot11u;
else if (wktot11u < 0) then ui_cur=wktot11u;
else if (rctot11u < 0) then ui_cur=rctot11u;
else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;
else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;
else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;
else seis_cur=Q13_24;

if (paflaga = 1 | (wktot11s = -4 & rctot11s = -4)) then uis_cur=0;
else if (paflaga = 1 | (wktot11s = -4 & rctot11s = 0)) then uis_cur=0;
else if (wktot11s > 0 & rctot11s > 0) then uis_cur=rctot11s;
else if (wktot11s < 0) then uis_cur=wktot11s;
else if (rctot11s < 0) then uis_cur=rctot11s;
else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;
else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;
else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;
else chsps_c=Q13_33m;

if (rctot11a = -4 | rctot11a = 0) then afdc_cur=0;
else if (motot11a = -4 | motot11a = 0) then afdc_cur=0;
else if (rctot11a < 0) then afdc_cur=rctot11a;
else if (motot11a < 0) then afdc_cur=motot11a;
else if (motot11a <= 0) then afdc_cur=-3;
else afdc_cur=rctot11a;

if (rctot11f = -4 | rctot11f = 0) then food_cur=0;
else if (motot11f = -4 | motot11f = 0) then food_cur=0;
else if (rctot11f < 0) then food_cur=rctot11f;
else if (motot11f < 0) then food_cur=motot11f;
else if (motot11f <= 0) then food_cur=-3;
else food_cur=rctot11f;

if (rctot11w = -4 | rctot11w = 0) then ssi_cur=0;
else if (motot11w = -4 | motot11w = 0) then ssi_cur=0;
else if (rctot11w < 0) then ssi_cur=rctot11w;
else if (motot11w < 0) then ssi_cur=motot11w;
else if (motot11w <= 0) then ssi_cur=-3;
else ssi_cur=rctot11w;

if (Q13_66 = -4) then ed_cur=0;
else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;
else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;
else if (q13_70_v = -2|q13_70a_v=-2) then vet_cur=-2;
else if (q13_70_v = -1|q13_70a_v=-1) then vet_cur=-1;
else vet_cur=(q13_70_v * q13_70a_v);

if (q13_70_d = -4) then dis_cur=0;
else if (q13_70_d = -2|q13_70a_d=-2) then dis_cur=-2;
else if (q13_70_d = -1|q13_70a_d=-1) then dis_cur=-1;
else dis_cur=(q13_70_d * q13_70a_d);

if (q13_70_s = -4) then ss_cur=0;
else if (q13_70_s = -2|q13_70a_s=-2) then ss_cur=-2;
else if (q13_70_s = -1|q13_70a_s=-1) then ss_cur=-1;
else ss_cur=(q13_70_s * q13_70a_s);*replaced 12 by q13_70a_s;

if (Q13_75 = -4) then other_c=0;
else other_c=Q13_75;

data compute2;
set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;
else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;
else relreg_c=Q13_92c;

family_c=famsz12;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ12) SEARCH THRU THE HOUSEHOLD ENUMERATION
INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.
DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR
(>=50 & <=54)*/

mn1701=0;
mn1702=0;
mn1703=0;
faminc_c=0;
tnfi=-3;
compo1=mil_cur;
compo2=mils_cur;
compo3=wps_cur;
compo4=wpss_cur;
compo5=sei_cur;
compo6=seis_cur;
compo7=ui_cur;
compo8=uis_cur;
compo9=chsp_cur;
compo10=afdc_cur;
compo11=ssi_cur;
compo12=ed_cur;
compo13=edss_cur;
compo14=vet_cur;
compo15=other_c;
compo16=relwel_c;
compo17=relreg_c;
compo18=food_cur;
compo19=chsps_c;
compo20=wkcmp_c;
compo21=dis_cur;
compo22=ss_cur;

if (wktot11u = -4 & rctot11u > 0) then do;
ui_cur=-3;
compo7=-3;
end;
else if (wktot11u < 0 & wktot11u > -4) then do;
ui_cur=-3;
compo7=-3;
end;

if (wktot11s = -4 & rctot11s > 0) then do;
uis_cur=-3;
compo8=-3;
end;
else if (wktot11s < 0 & wktot11s > -4) then do;
uis_cur=-3;
compo8=-3;
end;

if (motot11a = -4 & rctot11a > 0) then do;
afdc_cur=-3;
compo10=-3;
end;
else if (motot11a < 0 & motot11a > -4) then do;
afdc_cur=-3;
compo10=-3;
end;

if (motot11f = -4 & rctot11f > 0) then do;
food_cur=-3;
compo18=-3;
end;
else if (motot11f < 0 & motot11f > -4) then do;
food_cur=-3;
compo18=-3;
end;

if (motot11w = -4 & rctot11w > 0) then do;
ssi_cur=-3;
compo11=-3;
end;

else if (motot11w < 0 & motot11w > -4) then do;
ssi_cur=-3;
compo11=-3;
end;

array compo (j) compo1 compo2 compo3 compo4 compo5 compo6 compo7
compo8 compo9 compo10 compo11 compo12 compo13 compo14
compo15 compo16 compo17 compo18 compo19 compo20
compo21 compo22;

do j=1 to 22;
if (compo > -4) then do;
if (compo < 0 & compo = -1) then mn1701=(mn1701+1);
else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);
else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);
else faminc_c=(faminc_c + compo);
end;
end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then tnfi=faminc_c;
else do;
if (mn1703 > 0) then tnfi=-3;
else if (mn1702 > 0) then tnfi=-2;
else if (mn1701 > 0) then tnfi=-1;
end;

if (paflaga = -5) then tnfi=-5;

* income trunc;

data compute3;
set compute2;

tnfi_trunc=tnfi;
if (tnfi >= 290500) then tnfi_trunc=497763;

if (tnfi > level_c) then cps_cur=0;
else if (tnfi >= 0 & tnfi <= level_c) then cps_cur=1;
else cps_cur=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;
    if (mn > 0) then mn=1;
end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;
if (paflaga = -5) then cps_cur=-5;

 

2014 Variables

* PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2013;

afdc_cur=-4;

chsp_cur=-4;

chsps_c=-4;

cps_cur=-4;

ed_cur=-4;

edss_cur=-4;

family_c=-4;

faminc_c=-4;

food_cur=-4;

tnfi=-4;

level_c=-4;

mil_cur=-4;

mils_cur=-4;

mn1701=-4;

mn1702=-4;

mn1703=-4;

other_c=-4;

ssi_cur=-4;

relreg_c=-4;

relwel_c=-4;

s_cur=-4;

sei_cur=-4;

seis_cur=-4;

sumn_cur=-4;

target_c=-4;

ui_cur=-4;

uis_cur=-4;

vet_cur=-4;

wps_cur=-4;

wpss_cur=-4;

wkcmp_c=-4;

dis_cur=-4;

ss_cur=-4;

if (Q13_3 = -4) then mil_cur=0;

else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;

else wps_cur=Q13_5;

/* comment out business/farm income collected with assets for 2014 - put back in 2016;

* series to incorporate new farm & bus income qs; 

fjt_inc=fjt_141;

if (fjt_inc = -4) then farm_cur=0;

       else farm_cur=fjt_inc;

bpjt_inc=bp_141;

if (bpjt_inc = -4) then bus_cur=0;

               else bus_cur=bpjt_inc;

fbr_inc=q13_132d;

if (fbr_inc = -4) then fbr_cur=0;

               else fbr_cur=fbr_inc;

*/

if (Q13_9 = -4) then sei_cur=0;

               else sei_cur=Q13_9;

/*if (farm_cur > 0) then sei_cur=(sei_cur+farm_cur);

if (bus_cur > 0)  then sei_cur=(sei_cur+bus_cur);

if (fbr_cur > 0)  then sei_cur=(sei_cur+fbr_cur);

*/

run;

data compute1;set compute;

if (wktot13u = -4 & rctot13u = -4) then ui_cur=0;/*unemp comp dol*/

else if (wktot13u = -4 & rctot13u = 0) then ui_cur=0;

else if (wktot13u > 0 & rctot13u > 0) then ui_cur=rctot13u;

else if (wktot13u < 0) then ui_cur=wktot13u;

else if (rctot13u < 0) then ui_cur=rctot13u;

else ui_cur=-3;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;

else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;

else wpss_cur=Q13_18;

 if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;

else seis_cur=Q13_24;

 if (paflaga = 1 | (wktot13s = -4 & rctot13s = -4)) then uis_cur=0;/*spuc dol*/

else if (paflaga = 1 | (wktot13s = -4 & rctot13s = 0)) then uis_cur=0;

else if (wktot13s > 0 & rctot13s > 0) then uis_cur=rctot13s;

else if (wktot13s < 0) then uis_cur=wktot13s;

else if (rctot13s < 0) then uis_cur=rctot13s;

else uis_cur=-3;

if (q13_31b = -4) then wkcmp_c=0;*spouse worker's compensation;

else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;

else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;

else chsps_c=Q13_33m;

 

if (rctot13a = -4 | rctot13a = 0) then afdc_cur=0;

else if (motot13a = -4 | motot13a = 0) then afdc_cur=0;

else if (rctot13a < 0) then afdc_cur=rctot13a;

else if (motot13a < 0) then afdc_cur=motot13a;

else if (motot13a <= 0) then afdc_cur=-3;

else afdc_cur=rctot13a;

if (rctot13f = -4 | rctot13f = 0) then food_cur=0;

else if (motot13f = -4 | motot13f = 0) then food_cur=0;

else if (rctot13f < 0) then food_cur=rctot13f;

else if (motot13f < 0) then food_cur=motot13f;

else if (motot13f <= 0) then food_cur=-3;

else food_cur=rctot13f;

if (rctot13w = -4 | rctot13w = 0) then ssi_cur=0;

else if (motot13w = -4 | motot13w = 0) then ssi_cur=0;

else if (rctot13w < 0) then ssi_cur=rctot13w;

else if (motot13w < 0) then ssi_cur=motot13w;

else if (motot13w <= 0) then ssi_cur=-3;

else ssi_cur=rctot13w;

if (Q13_66 = -4) then ed_cur=0;

else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;

else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;

else if (q13_70_v = -2|q13_70a_v=-2) then vet_cur=-2;

else if (q13_70_v = -1|q13_70a_v=-1) then vet_cur=-1;

else if q13_70_v >=0 & q13_70a_v>=0 then vet_cur=(q13_70_v * q13_70a_v);

if (q13_70_d = -4) then dis_cur=0;

else if (q13_70_d = -2|q13_70a_d=-2) then dis_cur=-2;

else if (q13_70_d = -1|q13_70a_d=-1) then dis_cur=-1;

else if q13_70_d>=0 & q13_70a_d>=0 then dis_cur=(q13_70_d * q13_70a_d);*replaced 12 by q13_70a_d;

if (q13_70_s = -4) then ss_cur=0;

else if (q13_70_s = -2|q13_70a_s=-2) then ss_cur=-2;

else if (q13_70_s = -1|q13_70a_s=-1) then ss_cur=-1;

else if q13_70_s>=0 & q13_70a_s>=0 then ss_cur=(q13_70_s * q13_70a_s);

if (Q13_75 = -4) then other_c=0;

else other_c=Q13_75;

data compute2;set compute1;

if (vet_cur > 0 & other_c = vet_cur) then other_c=0;

if (Q13_92 = -4) then relwel_c=0;

else relwel_c=Q13_92;

if (Q13_92c = -4) then relreg_c=0;

else relreg_c=Q13_92c;

family_c=famsize;

/* TO CREATE FAMILY SIZE (I.E. FAMSZ12) SEARCH THRU THE HOUSEHOLD ENUMERATION

  INCREMENT FAMILY SIZE, IF THE RELATIONSHIP TO THE YOUTH IS A RELATIVE.

  DO NOT INCREASE FAMILY SIZE, IF THE CODE IS <0 OR (>=33 & <=36) OR =45 OR =46 OR

  (>=50 & <=54)*/

mn1701=0;

mn1702=0;

mn1703=0;

faminc_c=0;

tnfi=-3;

compo1=mil_cur;

compo2=mils_cur;

compo3=wps_cur;

compo4=wpss_cur;

compo5=sei_cur;

compo6=seis_cur;

compo7=ui_cur;

compo8=uis_cur;

compo9=chsp_cur;

compo10=afdc_cur;

compo11=ssi_cur;

compo12=ed_cur;

compo13=edss_cur;

compo14=vet_cur;

compo15=other_c;

compo16=relwel_c;

compo17=relreg_c;

compo18=food_cur;

compo19=chsps_c;

compo20=wkcmp_c;

compo21=dis_cur;

compo22=ss_cur;

if (wktot13u = -4 & rctot13u > 0) then do;

        ui_cur=-3;

        compo7=-3;

end;

else if (wktot13u < 0 & wktot13u > -4) then do;

        ui_cur=-3;

        compo7=-3;

end;

if (wktot13s = -4 & rctot13s > 0) then do;

        uis_cur=-3;

        compo8=-3;

end;

else if (wktot13s < 0 & wktot13s > -4) then do;

        uis_cur=-3;

        compo8=-3;

end;

if (motot13a = -4 & rctot13a > 0) then do;

        afdc_cur=-3;

        compo10=-3;

end;

else if (motot13a < 0 & motot13a > -4) then do;

        afdc_cur=-3;

        compo10=-3;

end;

if (motot13f = -4 & rctot13f > 0) then do;

        food_cur=-3;

        compo18=-3;

end;

else if (motot13f < 0 & motot13f > -4) then do;

        food_cur=-3;

        compo18=-3;

end;

if (motot13w = -4 & rctot13w > 0) then do;

        ssi_cur=-3;

        compo11=-3;

end;

else if (motot13w < 0 & motot13w > -4) then do;

        ssi_cur=-3;

        compo11=-3;

end;

array compo (j) compo1  compo2  compo3  compo4  compo5  compo6  compo7

                compo8  compo9  compo10 compo11 compo12 compo13 compo14

                compo15 compo16 compo17 compo18 compo19 compo20

                compo21 compo22;

do j=1 to 22;

  if (compo > -4) then do;

    if (compo < 0 & compo = -1) then mn1701=(mn1701+1);

    else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);

    else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);

    else faminc_c=(faminc_c + compo);

  end;

end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then tnfi=faminc_c;

else do;

  if (mn1703 > 0) then tnfi=-3;

   else if (mn1702 > 0) then tnfi=-2;

   else if (mn1701 > 0) then tnfi=-1;

end;

if (paflaga = -5) then tnfi=-5;

*income trunc;

data compute3;set compute2;

tnfi_trunc=tnfi;

if (tnfi >= 310000) then tnfi_trunc=595986;

* poverty status and level;

if year_pcy14=2013 then do;

               if family_c > 0 then level_c=(table13 + (tbl13_inc * (family_c-1)));*interviewed in 2014 using 2013 guideline;

end;

else if year_pcy14=2014 then do;

               if family_c > 0 then level_c=(table14 + (tbl14_inc * (family_c-1)));*interviewed in 2015 using 2014 guideline;

end;

if (tnfi > level_c) then cps_cur=0;

else if (tnfi >= 0 & tnfi <= level_c) then cps_cur=1;

else cps_cur=-3;

array mn (k) mn1701 mn1702 mn1703;

do k=1 to 3;

               if (mn > 0) then mn=1;

end;

if (sumn_cur > 0) then sumn_cur=1;

if (paflaga = -5) then level_c=-5;

if (paflaga = -5) then cps_cur=-5;

 

2016 Variables

*PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2015 & 2016 (ROUND 27)

 /****  QNAME in the Gator      Variable name in the program
------------------------------------------------------------------------------   
       UNEMPR-TOTAL-2015            rctot15u
       UNEMPSP-TOTAL-2015           rctot15s
       AFDC-TOTAL-2015                rctot15a
       FDSTMPS-TOTAL-2015          rctot15f
       SSI-TOTAL-2015                  rctot15w
       WELFARE-AMT-2015             rctot15t
       UNEMPR-TOTAL-2016           rctot16u
       UNEMPSP-TOTAL-2016          rctot16s
       AFDC-TOTAL-2016               rctot16a
       FDSTMPS-TOTAL-2016          rctot16f
       SSI-TOTAL-2016                 rctot16w
       WELFARE-AMT-2016            rctot16t
       Q13-3                              Q13_3         
       Q13-5                              Q13_5       
       Q13-9                              Q13_9       
       Q13-16                            Q13_16      
       Q13-18                            Q13_18      
       Q13-24                            Q13_24      
       Q13-31B                          Q13_31B     
       Q13-33I                          Q13_33I     
       Q13-33M                         Q13_33M     
       Q13-66                           Q13_66      
       Q13-68                           Q13_68      
       Q13-70_VET                    Q13_70_V    
       Q13-70A_VET                  Q13_70A_V   
       Q13-70_DIS                    Q13_70_D    
       Q13-70A_DIS                  Q13_70A_D   
       Q13-70_SS                     Q13_70_S    
       Q13-70A_SS                   Q13_70A_S   
       Q13-75                          Q13_75      
       Q13-81-NEW                   Q13_81_N    
       Q13-FJT-13.01                FJT_131     
       Q13-FJT-13.02                FJT_132     
       Q13-FJT-14.01                FJT_141     
       Q13-FJT-15.01                FJT_151     
       Q13-FJT-15.02                FJT_152     
       Q13-BPPJT-13.01                BP_131      
       Q13-BPPJT-13.02                BP_132      
       Q13-BPPJT-13.03                BP_133      
       Q13-BPPJT-13.04                BP_134      
       Q13-BPPJT-14.01                BP_141      
       Q13-BPPJT-14.02                BP_142      
       Q13-BPPJT-14.03                BP_143      
       Q13-BPPJT-14.04                BP_144      
       Q13-BPPJT-15.01                BP_151      
       Q13-132D                         Q13_132D    
       FAMSIZE                            FAMSIZE     
       SYMBOL_CURDATE~D            curday      
       SYMBOL_CURDATE~M            curmo       
       SYMBOL_CURDATE~Y            curyr       
       SYMBOL_SPFLAG                  SPFLAG      
       SYMBOL_PAFLAG                  paflag      
       HHI_FINAL_RELCODE.01            rel01       
       HHI_FINAL_RELCODE.02            rel02       
       HHI_FINAL_RELCODE.03            rel03       
       HHI_FINAL_RELCODE.04            rel04       
       HHI_FINAL_RELCODE.05            rel05       
       HHI_FINAL_RELCODE.06            rel06       
       HHI_FINAL_RELCODE.07            rel07       
       HHI_FINAL_RELCODE.08            rel08       
       HHI_FINAL_RELCODE.09            rel09       
       HHI_FINAL_RELCODE.10            rel10       
       HHI_FINAL_RELCODE.11            rel11       
       HHI_FINAL_RELCODE.12            rel12     
*/  

* add to paflag for any missed;
paflaga = paflag;
if (rel01 = 33 | rel02 = 33 | rel03 = 33 | rel04 = 33 | rel05 = 33
    | rel06 = 33 | rel07 = 33 | rel08 = 33 | rel09 = 33 | rel10 = 33
    | rel11 = 33 | rel12 = 33 )
    then paflaga=1;

spflaga = 0;
if (rel01 = 1 | rel02 = 1 | rel03 = 1 | rel04 = 1 | rel05 = 1
    | rel06 = 1 | rel07 = 1 | rel08 = 1 | rel09 = 1 | rel10 = 1
    | rel11 = 1 | rel12 = 1)
    then spflaga=1;
                                                   
*INITIALIZE;
afdc_cur=-4;
chsp_cur=-4;
chsps_c=-4;
cps_cur=-4;
ed_cur=-4;
edss_cur=-4;
family_c=-4;
faminc_c=-4;
food_cur=-4;
income_c=-4;
level_c=-4;
mil_cur=-4;
mils_cur=-4;
mn1701=-4;
mn1702=-4;
mn1703=-4;
other_c=-4;
ssi_cur=-4;
rel_cur=-4;
sei_cur=-4;
seis_cur=-4;
sumn_cur=-4;
ui_cur=-4;
uis_cur=-4;
vet_cur=-4;
wps_cur=-4;
wpss_cur=-4;
wkcmp_c=-4;
dis_cur=-4;
ss_cur=-4;

if (Q13_3 = -4) then mil_cur=0;
else mil_cur=Q13_3;

if (Q13_5 = -4) then wps_cur=0;
else wps_cur=Q13_5;

fjt_inc=fjt_141;  
if (fjt_inc = -4) then farm_cur=0;
    else farm_cur=fjt_inc;

array bp14 (*) bp_141-bp_144;
bus_cur=0;
do i=1 to dim(bp14);
  if bp14(i) in (-1 -2 -3) then bus_cur=-3;
  else if bp14(i) in (0 -4) & bus_cur>=0 then bus_cur=bus_cur;
  else if bp14(i)>0 & bus_cur>=0 then bus_cur=bus_cur + bp14(i);
end;

fbr_inc=q13_132d;
if (fbr_inc = -4) then fbr_cur=0;
    else fbr_cur=fbr_inc;

if (Q13_9 = -4) then sei_cur=0;
    else sei_cur=Q13_9;

  if sei_cur>=0 & farm_cur >0 then sei_cur=(sei_cur+farm_cur);
  else if farm_cur in (-1 -2 -3) then sei_cur=-3;
  if sei_cur>=0 & bus_cur > 0  then sei_cur=(sei_cur+bus_cur);
  else if bus_cur in (-1 -2 -3) then sei_cur=-3;
  if sei_cur>=0 & fbr_cur > 0  then sei_cur=(sei_cur+fbr_cur);
  else if fbr_cur in (-1 -2 -3) then sei_cur=-3;

 if curyr=2016 then do;
  rctotu  =   rctot15u;
  rctots  =   rctot15s;
  rctota  =   rctot15a;
  rctotf  =   rctot15f;
  rctotw  =   rctot15w;
  rctott  =   rctot15t;
 end;
 else if curyr=2017 then do;
  rctotu  =   rctot16u;
  rctots  =   rctot16s;
  rctota  =   rctot16a;
  rctotf  =   rctot16f;
  rctotw  =   rctot16w;
  rctott  =   rctot16t;
 end;
 
if rctotu = -4 then ui_cur=0;
 else ui_cur= rctotu;

if (paflaga = 1 | Q13_16 = -4) then mils_cur=0;  
else mils_cur=Q13_16;

if (paflaga = 1 | Q13_18 = -4) then wpss_cur=0;
else wpss_cur=Q13_18;

if (paflaga = 1 | Q13_24 = -4) then seis_cur=0;
else seis_cur=Q13_24;

if (paflaga = 1 | rctots = -4) then uis_cur=0;
  else uis_cur=rctots;

if (q13_31b = -4) then wkcmp_c=0;  
else wkcmp_c=q13_31b;

if (Q13_33i = -4) then chsp_cur=0;
else chsp_cur=Q13_33i;

if (paflaga = 1 | Q13_33m = -4) then chsps_c=0;
else chsps_c=Q13_33m;

if rctota = -4 then afdc_cur=0;
 else afdc_cur= rctota;

if rctotf = -4 then food_cur=0;
 else food_cur= rctotf;

if rctotw = -4 then ssi_cur=0;
 else ssi_cur= rctotw;

if (Q13_66 = -4) then ed_cur=0;
else ed_cur=Q13_66;

if (paflaga = 1 | Q13_68 = -4) then edss_cur=0;
else edss_cur=Q13_68;

if (q13_70_v = -4) then vet_cur=0;         
else if (q13_70_v = -2|q13_70a_v=-2) then vet_cur=-2;
else if (q13_70_v = -1|q13_70a_v=-1) then vet_cur=-1;
else if q13_70_v >=0 & q13_70a_v>=0 then vet_cur=(q13_70_v * q13_70a_v);

if (q13_70_d = -4) then dis_cur=0;
else if (q13_70_d = -2|q13_70a_d=-2) then dis_cur=-2;
else if (q13_70_d = -1|q13_70a_d=-1) then dis_cur=-1;
else if q13_70_d>=0 & q13_70a_d>=0 then dis_cur=(q13_70_d * q13_70a_d);

if (q13_70_s = -4) then ss_cur=0;
else if (q13_70_s = -2|q13_70a_s=-2) then ss_cur=-2;
else if (q13_70_s = -1|q13_70a_s=-1) then ss_cur=-1;
else if q13_70_s>=0 & q13_70a_s>=0 then ss_cur=(q13_70_s * q13_70a_s);

if (Q13_75 = -4) then other_c=0;
else other_c=Q13_75;

if (Q13_81_N = -4) then rel_cur=0;
else rel_cur=Q13_81_N;
 
family_c=famsize;

mn1701=0;
mn1702=0;
mn1703=0;
faminc_c=0;
income_c=-3;
compo1=mil_cur;
compo2=mils_cur;
compo3=wps_cur;
compo4=wpss_cur;
compo5=sei_cur;
compo6=seis_cur;
compo7=ui_cur;
compo8=uis_cur;
compo9=chsp_cur;
compo10=afdc_cur;
compo11=ssi_cur;
compo12=ed_cur;
compo13=edss_cur;
compo14=vet_cur;
compo15=other_c;
compo16=rel_cur;
compo17=food_cur;
compo18=chsps_c;
compo19=wkcmp_c;
compo20=dis_cur;
compo21=ss_cur;

array compo (j) compo1  compo2  compo3  compo4  compo5  compo6  compo7
                compo8  compo9  compo10 compo11 compo12 compo13 compo14
                compo15 compo16 compo17 compo18 compo19 compo20
                compo21;

do j=1 to 21;
  if (compo > -4) then do;
    if (compo < 0 & compo = -1) then mn1701=(mn1701+1);
    else if (compo < 0 & compo = -2) then mn1702=(mn1702+1);
    else if (compo < 0 & compo = -3) then mn1703=(mn1703+1);
    else faminc_c=(faminc_c + compo);
  end;
end;

sumn_cur=mn1701 + mn1702 + mn1703;

if (sumn_cur = 0) then income_c=faminc_c;
else do;
  if (mn1703 > 0) then income_c=-3;
   else if (mn1702 > 0) then income_c=-2;
   else if (mn1701 > 0) then income_c=-1;
end;

* poverty status and level;
if curyr=2016 then do;
    if family_c > 0 then level_c=(table15 + (tbl15_inc * (family_c-1)));*interviewed in 2016 using 2015 guideline;
end;
else if curyr=2017 then do;
    if family_c > 0 then level_c=(table16 + (tbl16_inc * (family_c-1)));*interviewed in 2017 using 2016 guideline;
end;
if (income_c > level_c) then cps_cur=0;
else if (income_c >= 0 & income_c <= level_c) then cps_cur=1;
else cps_cur=-3;

***** top coding;
data two;set one;
incom_ct=income_c;
if (income_c >= 352000) then incom_ct=922631;  

 

2018 Variables

*PROGRAM STATEMENTS FOR TOTAL NET FAMILY INCOME 2018 (ROUND 28)

 /****  QNAME in the Gator      Variable name in the program
------------------------------------------------------------------------------   
       UNEMPR-TOTAL-2017            rctot17u
       UNEMPSP-TOTAL-2017           rctot17s
       AFDC-TOTAL-2017               rctot17a
       FDSTMPS-TOTAL-2017          rctot17f
       SSI-TOTAL-2017                  rctot17w
       WELFARE-AMT-2017             rctot17t
       UNEMPR-TOTAL-2018           rctot18u
       UNEMPSP-TOTAL-2018          rctot18s

AFDC-TOTAL-2018               rctot18a
       FDSTMPS-TOTAL-2018          rctot18f
       SSI-TOTAL-2018                 rctot18w
       WELFARE-AMT-2018            rctot18t
       Q13-5                                  Q13_5

       Q13-9                                  q13_9

       RR-PENSIONS-1                          RR_pen1

       RR-PENSIONS-2                          RR_pen2

       RR-ANNUITIES-1                         RR_anu1

       RR-ANNUITIES-2                         RR_anu2

RR-IRA-1                               RR_ira1

       RR-IRA-3                               RR_ira3

       RR-IRA-4                               RR_ira4

       RR-SOCSEC-1                            RR_SS

       Q13-69_SS                              Q69_SS

       Q13-70A_SS                             q70a_ss

       Q13-70_SS                              q70_ss

       Q13-70A_DIS.01                         q70a_dis1

Q13-70A_DIS.02                         q70a_dis2

       Q13-70_DIS.01                          q70_dis1

       Q13-70_DIS.02                          q70_dis2

       Q13-31A                                q13_31a

       Q13-31B                                q13_31b

       Q13-70A_VET                            q70a_vet

       Q13-70_VET                             q70_vet

Q13-18                                 q13_18

       Q13-24                                 q13_24

       RSP-PENSIONS-1                         RS_pen1

       RSP-PENSIONS-2                         RS_pen2

       RSP-ANNUITIES-1                        RS_anu1

       RSP-ANNUITIES-2                        RS_anu2

       RSP-IRA-1                              RS_ira1

       RSP-IRA-3                              RS_ira3

       RSP-IRA-4                              RS_ira4

       RSP-SOCSEC-1                           RS_SS

       Q13-69_SS-SP                           q69_SS_SP

       Q13-70A_SS-SP                          q70a_ss_sp

       Q13-70_SS-SP                           q70_ss_sp

       Q13-70A_DIS-SP.01                      q70a_dis1_sp

       Q13-70A_DIS-SP.02                      q70a_dis2_sp

       Q13-70_DIS-SP.01                       q70_dis1_sp

       Q13-70_DIS-SP.02                       q70_dis2_sp

       Q13-31A-SP                             q13_31a_sp

       Q13-31B-SP                             q13_31b_sp

       Q13-70A-SP_VET                         q70a_vet_sp

       Q13-70_VET-SP                          q70_vet_sp

       Q13-71                                 q13_71

       Q13-73A                                q13_73a

       Q13-74                                 q13_74

       Q13-75                                 q13_75

       Q13-80-NEW                             q13_80

  Q13-81-NEW                             q13_81

       CURDATE~D                              curday

       CURDATE~M                              curmo

       CURDATE~Y                              curyr

       Q13-10                                 q10

       FAMSIZE                            FAMSIZE     

       SYMBOL_SPFLAG                  SPFLAG      
       SYMBOL_PAFLAG                  paflag      
       HHI_FINAL_RELCODE.01            rel01       
       HHI_FINAL_RELCODE.02            rel02       
       HHI_FINAL_RELCODE.03            rel03       
       HHI_FINAL_RELCODE.04            rel04       
       HHI_FINAL_RELCODE.05            rel05       
       HHI_FINAL_RELCODE.06            rel06       
       HHI_FINAL_RELCODE.07            rel07       
       HHI_FINAL_RELCODE.08            rel08       
       HHI_FINAL_RELCODE.09            rel09       
       HHI_FINAL_RELCODE.10            rel10       

       HHI_FINAL_RELCODE.11            rel11       
       HHI_FINAL_RELCODE.12            rel12     
*/

* add to paflag for any missed;

paflaga = paflag;
       HHI_FINAL_RELCODE.11            rel11       
       HHI_FINAL_RELCODE.12            rel12     
*/

* add to paflag for any missed;

paflaga = paflag;

if (rel01 = 33 | rel02 = 33 | rel03 

spflaga = spflag;

if (rel01 = 1 | rel02 = 1 | rel03 = 1 | rel04 = 1 | rel05 = 1

    | rel06 = 1 | rel07 = 1 | rel08 = 1 | rel09 = 1 | rel10 = 1

    | rel11 = 1 )

    then spflaga=1;

***** respondent (and dependent children) income;

* wager--wage;

wager=-3;

if q13_5>=0 then wager=q13_5;

* farmr--income from farm or business;

farmr=-3;

if q13_9=-4 then farmr=0;

else if q13_9>=0 then farmr=q13_9;

 

* penr--income from retirement pension;

penr=-3;

if RR_pen1 in (-4 0) then penr=0;

else if RR_pen2>=0 then penr=RR_pen2;

* anur--income from retirement annuity;

anur=-3;

if RR_anu1 in (-4 0) then anur=0;

else if RR_anu2>=0 then anur=RR_anu2;

* irar--withdraw from IRA;

irar=-3;

if RR_ira1 in (-4 0) or RR_ira3=0 then irar=0;

else if RR_ira4>=0 then irar=RR_ira4;

* ssr--income from social security;

ssr=-3;

if RR_SS in (-4 0) or q69_ss=0 then ssr=0;

else if q70a_ss>=0 and q70_ss>=0 then ssr=q70a_ss * q70_ss;

* dis1r--veteran disability;

dis1r=-3;

if q70a_dis1=-4 then dis1r=0;

else if q70a_dis1>=0 and q70_dis1>=0 then dis1r=q70a_dis1 * q70_dis1;

* dis2r--other disability;

dis2r=-3;

if q70a_dis2=-4 then dis2r=0;

else if q70a_dis2>=0 and q70_dis2>=0 then dis2r=q70a_dis2 * q70_dis2;

* wcmpr--worker comp;

wcmpr=-3;

if q13_31a in (-4, 0) then wcmpr=0;

else if q13_31b>=0 then wcmpr=q13_31b;     

* vetr--other veteran benefit;

vetr=-3;

if q70a_vet=-4 then vetr=0;

else if q70a_vet>=0 and q70_vet>=0 then vetr=q70a_vet * q70_vet;

* respondent UC;

ucr=-3;

if curyr=2018 then ucr=ucr117;

else if curyr=2019 then ucr=ucr118;

if ucr in (. -4) then ucr=0;

if ucr in (-1 -2) then ucr=-3;

***** Spouse/partner;

* wages--spouse wage;

wages=-3;

if paflaga=1 or q13_18=-4 then wages=0;

else if q13_18>=0 then wages=q13_18;

* farms--spouse income from farm or business;

farms=-3;

if paflaga=1 or q13_24=-4 then farms=0;

else if q13_24>=0 then farms=q13_24;

* pensp--spouse/partner income from retirement pension;

pensp=-3;

if RS_pen1 in (-4 0) then pensp=0;

else if RS_pen2>=0 then pensp=RS_pen2;

* anusp--spouse/partner income from retirement annuity;

anusp=-3;

if RS_anu1 in (-4 0) then anusp=0;

else if RS_anu2>=0 then anusp=RS_anu2;

* irasp--spouse/partner withdraw from IRA;

irasp=-3;

if RS_ira1 in (-4 0) or RS_ira3=0 then irasp=0;

else if RS_ira4>=0 then irasp=RS_ira4;

* sssp--spouse/partner income from social security;

sssp=-3;

if RS_ss in (-4 0) or q69_ss_sp=0 then sssp=0;

else if q70a_ss_sp>=0 and q70_ss_sp>=0 then sssp=q70a_ss_sp * q70_ss_sp;

* dis1sp--spouse/partner veteran disability;

dis1sp=-3;

if q70a_dis1_sp=-4 then dis1sp=0;

else if q70a_dis1_sp>=0 and q70_dis1_sp>=0 then dis1sp=q70a_dis1_sp * q70_dis1_sp;

* dis2sp--spouse/partner other disability;

dis2sp=-3;

if q70a_dis2_sp=-4 then dis2sp=0;

else if q70a_dis2_sp>=0 and q70_dis2_sp>=0 then dis2sp=q70a_dis2_sp * q70_dis2_sp;

* wcmpsp--spouse/partner worker comp;

wcmpsp=-3;

if q13_31a_sp in (-4, 0) then wcmpsp=0;

else if q13_31b_sp>=0 then wcmpsp=q13_31b_sp;

* vetsp--spouse/partner other veteran benefit;

vetsp=-3;

if q70a_vet_sp=-4 then vetsp=0;

else if q70a_vet_sp>=0 and q70_vet_sp>=0 then vetsp=q70a_vet_sp * q70_vet_sp;

* spouse UC;

ucs=-3;

if curyr=2018 then ucs=ucsp117;

else if curyr=2019 then ucs=ucsp118;

if paflaga=1 or ucs in (. -4) then ucs=0;

if ucs in (-1 -2) then ucs=-3;

***** R and spouse/partner;

* afdc, food stamps, ssi and ssdi;

wel=-3;

if curyr=2018 then wel=wel117;

else if curyr=2019 then wel=wel118;

if wel in (-4 .) then wel=0;

 

*estates/trusts/inheritances;

trst=-3;

if q13_71 in (-4 0) then trst=0;

else if q13_73a>=0 then trst=q13_73a;

*income from other sources;

othrs=-3; *s refers to sources;

if q13_74 in (-4 0) then othrs=0;

else if q13_75>=0 then othrs=q13_75;

*income from other family memeber in the house;

othrp=-3; *p refers to people;

if q13_80 in (-4 0) then othrp=0;

else if q13_81>=0 then othrp=q13_81;

***** total family income;

array comp (*) wager farmr penr anur irar ssr dis1r dis2r wcmpr vetr ucr

         wages farms pensp anusp irasp sssp dis1sp dis2sp wcmpsp vetsp ucs

         wel trst othrs othrp;

faminc=0;

do j=1 to 26;

 if comp(j)=-3 then do; faminc=-3; j=26; end;

 else if faminc>=0 & comp(j)>=0 then faminc=faminc + comp(j);

end;

***** Poverty level;

curyr=2018 then do;

  if famsize > 0 then level=(table17 + (tbl17_inc * (famsize-1)));*interviewed in 2018 using 2017 guideline;

end;

else if curyr=2019 then do;

  if famsize > 0 then level=(table18 + (tbl18_inc * (famsize-1)));*interviewed in 2019 using 2018 guideline;

end;

if (faminc > level) then cps_cur=0;

else if (faminc >= 0 & faminc <= level) then cps_cur=1;

else cps_cur=-3;

if

***** topcode;

faminc_t=faminc;      if faminc>405500 then faminc_t=766958;

2020 Variables

Options pagesize=12686 linesize=100 nocenter nodate nolabel validvarname=any formchar="|----|+|---+=|-/\<>*";;
*respondent UC;
data UCr;
infile UCry dlm=',' lrecl=500;
input norcid UCr87-UCr121;
keep norcid UCr119 UCr120;
*spouse/partner UC;
data UCsp;
infile UCspy dlm=',' lrecl=300;
input norcid UCsp89-UCsp121;
keep norcid UCsp119 UCsp120;
*respondent and spouse/partner afdc,food stamps, ssdi, and ssi;
data wel; *b refer to both SSI and SSDI;
infile wby dlm=',' lrecl=50;
input norcid wel117-wel121;
keep norcid wel119 wel120;

data Q13;
set prg2020.in_inc_2020;
keep
'Q13-5_2020'n
'Q13-9_2020'n
'RR-PENSIONS-1_2020'n
'RR-PENSIONS-2_2020'n
'RR-ANNUITIES-1_2020'n
'RR-ANNUITIES-2_2020'n
'RR-IRA-1_2020'n
'RR-IRA-3_2020'n
'RR-IRA-4_2020'n
'RR-SOCSEC-1_2020'n
'Q13-69_SS_2020'n
'Q13-70A_SS_2020'n
'Q13-70_SS_2020'n
'Q13-70A_DIS.01_2020'n
'Q13-70A_DIS.02_2020'n
'Q13-70_DIS.01_2020'n
'Q13-70_DIS.02_2020'n
'Q13-31A_2020'n
'Q13-31B_2020'n
'Q13-70A_VET_2020'n
'Q13-70_VET_2020'n
'Q13-18_2020'n
'Q13-24_2020'n
'RSP-PENSIONS-1_2020'n
'RSP-PENSIONS-2_2020'n
'RSP-ANNUITIES-1_2020'n
'RSP-ANNUITIES-2_2020'n
'RSP-IRA-1_2020'n
'RSP-IRA-3_2020'n
'RSP-IRA-4_2020'n
'RSP-SOCSEC-1_2020'n
'Q13-69_SS-SP_2020'n
'Q13-70A_SS-SP_2020'n
'Q13-70_SS-SP_2020'n
'Q13-70A_DIS-SP.01_2020'n
'Q13-70A_DIS-SP.02_2020'n
'Q13-70_DIS-SP.01_2020'n
'Q13-70_DIS-SP.02_2020'n
'Q13-31A-SP_2020'n
'Q13-31B-SP_2020'n
'Q13-70A-SP_VET_2020'n
'Q13-70_VET-SP_2020'n
'Q13-71_2020'n
'Q13-73A_2020'n
'Q13-74_2020'n
'Q13-75_2020'n
'Q13-80-NEW_2020'n
'Q13-81-NEW_2020'n
'CURDATE~D_2020'n
'CURDATE~M_2020'n
'CURDATE~Y_2020'n
norcid
'Q13-10_2020'n
;

rename
'Q13-5_2020'n = Q13_5
'Q13-9_2020'n = q13_9
'RR-PENSIONS-1_2020'n = RR_pen1
'RR-PENSIONS-2_2020'n = RR_pen2
'RR-ANNUITIES-1_2020'n = RR_anu1
'RR-ANNUITIES-2_2020'n = RR_anu2
'RR-IRA-1_2020'n = RR_ira1
'RR-IRA-3_2020'n = RR_ira3
'RR-IRA-4_2020'n = RR_ira4
'RR-SOCSEC-1_2020'n = RR_SS
'Q13-69_SS_2020'n = Q69_SS
'Q13-70A_SS_2020'n = q70a_ss
'Q13-70_SS_2020'n = q70_ss
'Q13-70A_DIS.01_2020'n = q70a_dis1
'Q13-70A_DIS.02_2020'n = q70a_dis2
'Q13-70_DIS.01_2020'n = q70_dis1
'Q13-70_DIS.02_2020'n = q70_dis2
'Q13-31A_2020'n = q13_31a
'Q13-31B_2020'n = q13_31b
'Q13-70A_VET_2020'n = q70a_vet
'Q13-70_VET_2020'n = q70_vet
'Q13-18_2020'n = q13_18
'Q13-24_2020'n = q13_24
'RSP-PENSIONS-1_2020'n = RS_pen1
'RSP-PENSIONS-2_2020'n = RS_pen2
'RSP-ANNUITIES-1_2020'n = RS_anu1
'RSP-ANNUITIES-2_2020'n = RS_anu2
'RSP-IRA-1_2020'n = RS_ira1
'RSP-IRA-3_2020'n = RS_ira3
'RSP-IRA-4_2020'n = RS_ira4
'RSP-SOCSEC-1_2020'n = RS_SS
'Q13-69_SS-SP_2020'n = q69_SS_SP
'Q13-70A_SS-SP_2020'n = q70a_ss_sp
'Q13-70_SS-SP_2020'n = q70_ss_sp
'Q13-70A_DIS-SP.01_2020'n = q70a_dis1_sp
'Q13-70A_DIS-SP.02_2020'n = q70a_dis2_sp
'Q13-70_DIS-SP.01_2020'n = q70_dis1_sp
'Q13-70_DIS-SP.02_2020'n = q70_dis2_sp
'Q13-31A-SP_2020'n = q13_31a_sp
'Q13-31B-SP_2020'n = q13_31b_sp
'Q13-70A-SP_VET_2020'n = q70a_vet_sp
'Q13-70_VET-SP_2020'n = q70_vet_sp
'Q13-71_2020'n = q13_71
'Q13-73A_2020'n = q13_73a
'Q13-74_2020'n = q13_74
'Q13-75_2020'n = q13_75
'Q13-80-NEW_2020'n = q13_80
'Q13-81-NEW_2020'n = q13_81
'CURDATE~D_2020'n = curday
'CURDATE~M_2020'n = curmo
'CURDATE~Y_2020'n = curyr
'Q13-10_2020'n = q10
;

data one;
merge inc2020.in_fam2020 Q13 UCr UCsp Wel;
by norcid;
if FAMSIZE ~= -5;

paflaga = paflag;
if (rel01 = 33 | rel02 = 33 | rel03 = 33 | rel04 = 33 | rel05 = 33
| rel06 = 33 | rel07 = 33 | rel08 = 33 | rel09 = 33 | rel10 = 33
| rel11 = 33 )
then paflaga=1;

spflaga = spflag;
if (rel01 = 1 | rel02 = 1 | rel03 = 1 | rel04 = 1 | rel05 = 1
| rel06 = 1 | rel07 = 1 | rel08 = 1 | rel09 = 1 | rel10 = 1
| rel11 = 1 )
then spflaga=1;

***** respondent (and dependent children) income;
* wager--wage;
wager=-4;
if q13_5=-4 then wager=0;
else wager=q13_5;

* farmr--income from farm or business;
farmr=-4;
if q13_9=-4 then farmr=0;
else farmr=q13_9;

* penr--income from retirement pension;
penr=-4;
if RR_pen2 in (-4 0) then penr=0;
else penr=RR_pen2;

* anur--income from retirement annuity;
anur=-4;
if RR_anu2 in (-4 0) then anur=0;
else anur=RR_anu2;

* irar--withdraw from IRA;
irar=-4;
if RR_ira4 in (-4 0) then irar=0;
else irar=RR_ira4;

* ssr--income from social security;
ssr=-4;
if q70_ss=-4 then ssr=0;
else if q70a_ss in (-1 -2 -3) or q70_ss in (-1 -2 -3) then ssr=-3;
else if q70a_ss>=0 and q70_ss>=0 then ssr=q70a_ss * q70_ss;

* dis1r--veteran disability;
dis1r=-4;
if q70_dis1=-4 then dis1r=0;
else if q70a_dis1 in (-1 -2 -3) or q70_dis1 in (-1 -2 -3) then dis1r=-3;
else if q70a_dis1>=0 and q70_dis1>=0 then dis1r=q70a_dis1 * q70_dis1;

* dis2r--other disability;
dis2r=-4;
if q70_dis2=-4 then dis2r=0;
else if q70a_dis2 in (-1 -2 -3) or q70_dis2 in (-1 -2 -3) then dis2r=-3;
else if q70a_dis2>=0 and q70_dis2>=0 then dis2r=q70a_dis2 * q70_dis2;

* wcmpr--worker comp;
wcmpr=-4;
if q13_31b in (-4, 0) then wcmpr=0;
else wcmpr=q13_31b;

* vetr--other veteran benefit;
vetr=-4;
if q70_vet=-4 then vetr=0;
else if q70a_vet in (-1 -2 -3) or q70_vet in (-1 -2 -3) then vetr=-3;
else if q70a_vet>=0 and q70_vet>=0 then vetr=q70a_vet * q70_vet;

* respondent UC;
ucr=-3;
if curyr=2020 then ucr=ucr119;
else if curyr=2021 then ucr=ucr120;
if ucr in (. -4) then ucr=0;
if ucr in (-1 -2) then ucr=-3;

***** Spouse/partner;
* wages--spouse wage;
wages=-4;
if paflaga=1 or q13_18=-4 then wages=0;
else wages=q13_18;

* farms--spouse income from farm or business;
farms=-4;
if paflaga=1 or q13_24=-4 then farms=0;
else farms=q13_24;

* pensp--spouse/partner income from retirement pension;
pensp=-4;
if RS_pen2 in (-4 0) then pensp=0;
else pensp=RS_pen2;

* anusp--spouse/partner income from retirement annuity;
anusp=-4;
if RS_anu2 in (-4 0) then anusp=0;
else anusp=RS_anu2;

* irasp--spouse/partner withdraw from IRA;
irasp=-4;
if RS_ira4 in (-4 0) then irasp=0;
else irasp=RS_ira4;

* sssp--spouse/partner income from social security;
sssp=-4;
if q70_ss_sp=-4 then sssp=0;
else if q70a_ss_sp in (-1 -2 -3) or q70_ss_sp in (-1 -2 -3) then sssp=-3;
else if q70a_ss_sp>=0 and q70_ss_sp>=0 then sssp=q70a_ss_sp * q70_ss_sp;

* dis1sp--spouse/partner veteran disability;
dis1sp=-4;
if q70_dis1_sp=-4 then dis1sp=0;
else if q70a_dis1_sp in (-1 -2 -3) or q70_dis1_sp in (-1 -2 -3) then dis1sp=-3;
else if q70a_dis1_sp>=0 and q70_dis1_sp>=0 then dis1sp=q70a_dis1_sp * q70_dis1_sp;

* dis2sp--spouse/partner other disability;
dis2sp=-4;
if q70_dis2_sp=-4 then dis2sp=0;
else if q70a_dis2_sp in (-1 -2 -3) or q70_dis2_sp in (-1 -2 -3) then dis2sp=-3;
else if q70a_dis2_sp>=0 and q70_dis2_sp>=0 then dis2sp=q70a_dis2_sp * q70_dis2_sp;

* wcmpsp--spouse/partner worker comp;
wcmpsp=-4;
if q13_31b_sp in (-4, 0) then wcmpsp=0;
else wcmpsp=q13_31b_sp;

* vetsp--spouse/partner other veteran benefit;
vetsp=-4;
if q70_vet_sp=-4 then vetsp=0;
else if q70a_vet_sp in (-1 -2 -3) or q70_vet_sp in (-1 -2 -3) then vetsp=-3;
else if q70a_vet_sp>=0 and q70_vet_sp>=0 then vetsp=q70a_vet_sp * q70_vet_sp;

* spouse UC;
ucs=-3;
if curyr=2020 then ucs=ucsp119;
else if curyr=2021 then ucs=ucsp120;
if paflaga=1 or ucs in (. -4) then ucs=0;
else if ucs in (-1 -2) then ucs=-3;

***** R and spouse/partner;
* afdc, food stamps, ssi and ssdi;
wel=-3;
if curyr=2020 then wel=wel119;
else if curyr=2021 then wel=wel120;
if wel in (-4 .) then wel=0;

*estates/trusts/inheritances;
trst=-4;
if q13_73a in (-4 0) then trst=0;
else trst=q13_73a;

*income from other sources;
othrs=-4; *s refers to sources;
if q13_75 in (-4 0) then othrs=0;
else othrs=q13_75;

*income from other family memeber in the house;
othrp=-4; *p refers to people;
if q13_81 in (-4 0) then othrp=0;
else othrp=q13_81;

***** total family income;
array comp (*) wager farmr penr anur irar ssr dis1r dis2r wcmpr vetr ucr
wages farms pensp anusp irasp sssp dis1sp dis2sp wcmpsp vetsp ucs
wel othrs othrp; *removed trst;
faminc=0;
do j=1 to dim(comp);
if comp(j) in (-1 -2 -3) then do; faminc=-3; j=dim(comp); end;
else if faminc>=0 & comp(j)>=0 then faminc=faminc + comp(j);
end;

***** Poverty level;
* Federal Poverty Guidelines;
* https://aspe.hhs.gov/2019-poverty-guidelines;
* https://aspe.hhs.gov/2020-poverty-guidelines;
table19 = 12490;*for 1 person in family for 48 states and DC for 2019;
tbl19_inc=4420;*for each additional person for 48 states and DC for 2019;
table20=12760;*for 1 person in family for 48 states and DC for 2020;
tbl20_inc=4480;*for each additional person for 48 states and DC for 2020;

if curyr=2020 then do;
if famsize > 0 then level= table19 + (tbl19_inc * (famsize-1));*interviewed in 2020 using 2019 guideline;
end;
else if curyr=2021 then do;
if famsize > 0 then level= table20 + (tbl20_inc * (famsize-1));*interviewed in 2021 using 2020 guideline;
end;
if (faminc > level) then cps_cur=0;
else if (faminc >= 0 & faminc <= level) then cps_cur=1;
else cps_cur=-3;

***** topcode;
faminc_t=faminc;
if faminc>365000 then faminc_t=803437;