/********************************************************************************/; /* Program: harmonzd.tus_cps.1992.through.2019.add.replicate.weights.sas */; /* Date: June 2021 */; /* */; /* Purpose: SAS program to add the replicate weights to the 1992-2019 */; /* harmonized data file. */; /* */; /* Notes: The Filename, Libname and Include statements need to be modified */; /* to match location of the data files and the format progam. */; /* */; /* The SAS dataset of the harmonized 1992-2019 data needs to be */; /* created prior to running this code. The dataset should be created */; /* using code that was included with the harmonized data file. */; /* */; /* Modifications */; /* */; /********************************************************************************/; Filename Rep9293 "harmonzd.tus_cps.1992.through.2019.replicate.wgts.92_93.dat" Lrecl=567; Filename Rep9503 "harmonzd.tus_cps.1992.through.2019.replicate.wgts.95_03.dat" Lrecl=919; Filename Rep0619 "harmonzd.tus_cps.1992.through.2019.replicate.wgts.06_19.dat" Lrecl=1799; Libname MyLib "."; %Include "harmonzd.tus_cps.1992.through.2019.formats.sas"; Data Harmon; Set MyLib.Harmon; Run; Data Rep9293; Infile Rep9293; Input @001 SurYear 4. @005 SurMonth 2. @007 RecordID $Char22. @029 SmplWgt 11.4 @040 (RepWt001-RepWt048) (11.4); Run; Data Rep9503; Infile Rep9503; Input @001 SurYear 4. @005 SurMonth 2. @007 RecordID $Char22. @029 SmplWgt 11.4 @040 (RepWt001-RepWt080) (11.4); Run; Data Rep0619; Infile Rep0619; Input @001 SurYear 4. @005 SurMonth 2. @007 RecordID $Char22. @029 SmplWgt 11.4 @040 (RepWt001-RepWt160) (11.4); Run; Data Reps; Set Rep9293 Rep9503 Rep0619; Run; Proc Sort Data=Reps; By SurYear SurMonth RecordID; Run; Proc Sort Data=Harmon; By SurYear SurMonth RecordID; Run; Data Harmon; Merge Harmon(In=In1) Reps(In=In2); By SurYear SurMonth RecordID; Harm_File=In1; Reps_File=In2; Run; Proc Freq Data=Harmon; Table Harm_File*Reps_File/List Missing; Run;