Constructing Comparable Samples across the NLSY79 and NLSY97
NLSY79 STATA code for Part 5
*drop military supplemental sample;
drop if r0173600 >= 15 & r0173600 <= 20;
*drop economically disadvantaged non-black, non-Hispanic supplemental sample;
drop if r0173600 ==9 | r0173600 ==12;
**Sample size is now 9763 observations;
**define year of birth;
gen yob79 = r0000500;
**create variable for whether working during the week that includes October 1st in year turn 20;
**1 = working at a civilian or military job;
**0 = not working;
gen work79_20 = .;
replace work79_20 = 1 if (yob79==58) & (w0065200 >= 100 | w0065200==7);
replace work79_20 = 0 if (yob79==58) & (w0065200==2 | w0065200==4 | w0065200==5);
replace work79_20 = 1 if (yob79==59) & (w0070400 >= 100 | w0070400==7);
replace work79_20 = 0 if (yob79==59) & (w0070400==2 | w0070400==4 | w0070400==5);
replace work79_20 = 1 if (yob79==60) & (w0110300 >= 100 | w0110300==7);
replace work79_20 = 0 if (yob79==60) & (w0110300==2 | w0110300==4 | w0110300==5);
replace work79_20 = 1 if (yob79==61) & (w0150200 >= 100 | w0150200==7);
replace work79_20 = 0 if (yob79==61) & (w0150200==2 | w0150200==4 | w0150200==5);
replace work79_20 = 1 if (yob79==62) & (w0190100 >= 100 | w0190100==7);
replace work79_20 = 0 if (yob79==62) & (w0190100==2 | w0190100==4 | w0190100==5);
replace work79_20 = 1 if (yob79==63) & (w0230000 >= 100 | w0230000==7);
replace work79_20 = 0 if (yob79==63) & (w0230000==2 | w0230000==4 | w0230000==5);
replace work79_20 = 1 if (yob79==64) & (w0270500 >= 100 | w0270500==7);
replace work79_20 = 0 if (yob79==64) & (w0270500==2 | w0270500==4 | w0270500==5);
*work79_20 (mean = .604, N =8603);
*missings are mostly due to lack of employment status information at 20 for youths born in 1957;
NLSY97 STATA Code for Part 5
**define year of birth;
gen yob97 = r0536402;
**create variable for whether working during the week that includes October 1st in year turn 20;
**1 = working at a civilian or military job;
**0 = not working;
gen work97_20 = .;
replace work97_20 = 1 if (yob97==1980) & (r8812500 >= 9701 | r8812500==6);
replace work97_20 = 0 if (yob97==1980) & (r8812500==1 | r8812500==2 | r8812500==4 | r8812500==5);
replace work97_20 = 1 if (yob97==1981) & (r8908000 >= 9701 | r8908000==6);
replace work97_20 = 0 if (yob97==1981) & (r8908000==1 | r8908000==2 | r8908000==4 | r8908000==5);
replace work97_20 = 1 if (yob97==1982) & (r9043500 >= 9701 | r9043500==6);
replace work97_20 = 0 if (yob97==1982) & (r9043500==1 | r9043500==2 | r9043500==4 | r9043500==5);
replace work97_20 = 1 if (yob97==1983) & (r9048700 >= 9701 | r9048700==6);
replace work97_20 = 0 if (yob97==1983) & (r9048700==1 | r9048700==2 | r9048700==4 | r9048700==5);
replace work97_20 = 1 if (yob97==1984) & (r9179400 >= 9701 | r9179400==6);
replace work97_20 = 0 if (yob97==1984) & (r9179400==1 | r9179400==2 | r9179400==4 | r9179400==5);
*work97_20 (mean = .665, N =8435);