You are here
Home › Cohorts › NLSY97 › Other Documentation › Codebook Supplement › Appendix 3: Family Background and Formation ›Household Size as of Survey Date - Appendix 3
Household Size as of Survey Date - Appendix 3
Variables Created
- CV_HH_SIZE (HHSIZE)--Household size
- CV_HH_UNDER_6 (UNDER6)--Number of household members less than 6 years old
- CV_HH_UNDER_18 (UNDER18)--Number of household members less than 18 years old
This program creates several variables describing the composition of the respondent's household: the total number of residents, the number of residents under age 6, and the number of residents under age 18.
Variables Used
/*Variable Names in the Program Variable Names on the Gator*/
pubid pubid
HAGE01 HHI_AGE.01
HAGE02 HHI_AGE.02
HAGE03 HHI_AGE.03
HAGE04 HHI_AGE.04
HAGE05 HHI_AGE.05
HAGE06 HHI_AGE.06
HAGE07 HHI_AGE.07
HAGE08 HHI_AGE.08
HAGE09 HHI_AGE.09
HAGE10 HHI_AGE.10
HAGE11 HHI_AGE.11
HAGE12 HHI_AGE.12
HAGE13 HHI_AGE.13
HAGE14 HHI_AGE.14
HAGE15 HHI_AGE.15
HUID01 HHI_UID.01
HUID02 HHI_UID.02
HUID03 HHI_UID.03
HUID04 HHI_UID.04
HUID05 HHI_UID.05
HUID06 HHI_UID.06
HUID07 HHI_UID.07
HUID08 HHI_UID.08
HUID09 HHI_UID.09
HUID10 HHI_UID.10
HUID11 HHI_UID.11
HUID12 HHI_UID.12
HUID13 HHI_UID.13
HUID14 HHI_UID.14
HUID15 HHI_UID.15
SAS Code for Variable Creation
/*hand edits for round 14*/
if pubid=5923 then hage01=30;
ARRAY HAGE HAGE01-HAGE15;
ARRAY HUID HUID01-HUID15;
/* Create dummy variables HHDUM[I] (I=1 TO 15) that equal one if the ith member has a member ID, and zero
if the ith member does not have a member ID (i.e.HHID0i=-4).Also create dummies for the age:DUM6[I] (I=1 TO 15)
that equal 1 if the ith household member is under age 6 and DUM18[I] (I=1 TO 15) that equal 1 if the ith
household member is under age 18.*/
ARRAY HHDUM HHDUM01-HHDUM15;
ARRAY DUM6 DUM601-DUM615;
ARRAY DUM18 DUM1801-DUM1815;
DO I=1 TO 15;
HHDUM[I]=0;
DUM6[I]=0;
DUM18[I]=0;
END;
DO I=1 TO 15;
IF HUID[I]>-1 THEN HHDUM[I]=1;
IF -1<HAGE[I]<6 THEN DUM6[I]=1;
IF -1<HAGE[I]<18 THEN DUM18[I]=1;
IF -4<HAGE[I]<0 THEN DO;
DUM18[I]=-3;
UND6=-3;
END;
END;
/* Create household size HHSIZE by adding up the dummies HHDUM[I] and also add one due to the respondent himself.
Similarly, create variabes UNDER6 AND UNDER18 by adding up the other two dummies.*/
HHSIZE=1;
UNDER6=0;
UNDER18=0;
DO I=1 TO 15;
HHSIZE=HHSIZE+HHDUM[I];
UNDER6=UNDER6+DUM6[I];
UNDER18=UNDER18+DUM18[I];
END;
DO I=1 to 15;
IF DUM6[I]=-3 then UNDER6=-3;
IF DUM18[I]=-3 then UNDER18=-3;
END;
IF HUID01=-5 THEN HHSIZE=-5;
DO I=1 TO 15;
IF -4<HUID[I]<0 THEN HHSIZE=-3;
END;
IF HUID01=-5 THEN UNDER6=-5;
IF HUID01=-5 THEN UNDER18=-5;
DO I=1 TO 15;
IF -4<HAGE[I]<0 THEN PRT1=-3;
END;
IF HHSIZE=-3 THEN DO;
UNDER6=-3;
UNDER18=-3;
END;
IF UND6=-3 THEN DO;
UNDER6=-3;
END;
endsas;