Constructing Comparable Samples across the NLSY79 and NLSY97

NLSY79 SAS Code for Step 5

*drop military supplemental sample;
if (r0173600 ge 15 and r0173600 le 20) then delete;

*drop economically disadvantaged non-black, non-Hispanic supplemental sample;
if (r0173600 = 9 or r0173600 = 12) then delete;

**Sample size is now 9763 observations;

**define year of birth;
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;
if yob79 = 58 then do;
if (w0065200 ge 100 or w0065200 = 7) then work79_20 = 1;
if (w0065200 = 2 or w0065200 = 4 or w0065200 = 5) then work79_20 = 0;
end;
if yob79 = 59 then do;
if (w0070400 ge 100 or w0070400 = 7) then work79_20 = 1;
if (w0070400 = 2 or w0070400 = 4 or w0070400 = 5) then work79_20 = 0;
end;
if yob79 = 60 then do;
if (w0110300 ge 100 or w0110300 = 7) then work79_20 = 1;
if (w0110300 = 2 or w0110300 = 4 or w0110300 = 5) then work79_20 = 0;
end;
if yob79 = 61 then do;
if (w0150200 ge 100 or w0150200 = 7) then work79_20 = 1;
if (w0150200 = 2 or w0150200 = 4 or w0150200 = 5) then work79_20 = 0;
end;
if yob79 = 62 then do;
if (w0190100 ge 100 or w0190100 = 7) then work79_20 = 1;
if (w0190100 = 2 or w0190100 = 4 or w0190100 = 5) then work79_20 = 0;
end;
if yob79 = 63 then do;
if (w0230000 ge 100 or w0230000 = 7) then work79_20 = 1;
if (w0230000 = 2 or w0230000 = 4 or w0230000 = 5) then work79_20 = 0;
end;
if yob79 = 64 then do;
if (w0270500 ge 100 or w0270500 = 7) then work79_20 = 1;
if (w0270500 = 2 or w0270500 = 4 or w0270500 = 5) then work79_20 = 0;
end;

*work79_20 (mean = .604, N =8603);
*missings are mostly due to lack of employment status information at 20 for youths born in 1957;

NLSY97 SAS Code for Step 5

**define year of birth;
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;
if yob97 = 1980 then do;
if (r8812500 ge 9701 or r8812500 = 6) then work97_20 = 1;
if (r8812500 = 1 or r8812500 = 2 or r8812500 = 4 or r8812500 = 5) then work97_20 = 0;
end;
if yob97 = 1981 then do;
if (r8908000 ge 9701 or r8908000 = 6) then work97_20 = 1;
if (r8908000 = 1 or r8908000 = 2 or r8908000 = 4 or r8908000 = 5) then work97_20 = 0;
end;
if yob97 = 1982 then do;
if (r9043500 ge 9701 or r9043500 = 6) then work97_20 = 1;
if (r9043500 = 1 or r9043500 = 2 or r9043500 = 4 or r9043500 = 5) then work97_20 = 0;
end;
if yob97 = 1983 then do;
if (r9048700 ge 9701 or r9048700 = 6) then work97_20 = 1;
if (r9048700 = 1 or r9048700 = 2 or r9048700 = 4 or r9048700 = 5) then work97_20 = 0;
end;
if yob97 = 1984 then do;
if (r9179400 ge 9701 or r9179400 = 6) then work97_20 = 1;
if (r9179400 = 1 or r9179400 = 2 or r9179400 = 4 or r9179400 = 5) then work97_20 = 0;
end;

*work97_20 (mean = .665, N =8435);