2004 HRS Core (Final Release, Version 1.0): Primary identifiers (PN) are missing from the file H04PR_SB.
April 02, 2007
The primary identifiers (PN) are missing from the file H04PR_SB. The following code will allow you to add PN to H04PR_SB.
The code to correct the errors, by section, is as follows:
Data pr_r; set
.H04PR_R; keep hhid jsubhh jpn_sp pn; run; proc sort;by hhid jsubhh jpn_sp; run; proc sort data= .h04pr_sb out=pr_sb; by hhid jsubhh jpn_sp; run; data .h04pr_sb; merge pr_r pr_sb(in=y); by hhid jsubhh jpn_sp; if y; run;
The above code pulls PN from the Respondent Level Preload file (H04PR_R), along with three identifiers that make each line unique. The last data step merges the identifiers onto H04PR_SB.