* NOTE: The following syntax will create new variables that use the old in-law classification scheme. * It should be applied only to ACS and PRCS IPUMS samples. In addition to RELATE and/or RELATED, your extract should contain * YEAR, SAMPLE, SERIAL, AGE, and MARST. It will create a new file named old_inlaw.sav with the following new variables: * relate_old_inlaw (RELATE with the old in-law classification) * related_old_inlaw (RELATED with the old in-law classification) * If you do not have both RELATE and RELATED in your file, you will need to delete all lines of the do-file that contain * any mention of the variable that your file lacks. * The syntax will also create two new files that you may safely delete: * temporig.sav * agehd.sav * Important: you need to put this syntax file in the same directory as your IPUMS data and then * replace 'YOUR DIRECTORY' below with the name of that directory (be sure to keep the single quotation marks). * You must also replace 'YOUR IPUMS FILE PATH AND NAME' below with the full path and name of your IPUMS file. file handle ipumsdat /name='YOUR DIRECTORY'. file handle origfile /name='YOUR IPUMS FILE PATH AND NAME.sav'. get file='origfile'. recode relate (4=14)(6=14)(8=14)(else=copy) into relate_old_inlaw. recode related (401=1401)(601=1401)(801=1401)(else=copy) into related_old_inlaw. sort cases by sample serial (A). save outfile='ipumsdat\temporig.sav'. compute head=0. if (relate=1) head=1. if (related=101) head=1. select if (head=1). sort cases by sample serial (A). save outfile='ipumsdat\agehd.sav' /keep=year sample serial age /rename age=agehd. get file='ipumsdat\temporig.sav'. match files file=* /table='ipumsdat\agehd.sav' /by sample serial. compute agediffhd = age - agehd. if (relate_old_inlaw=14 & (marst=6 or (agediffhd>=-16 & agediffhd<=10))) relate_old_inlaw=8. if (relate_old_inlaw=14 & agediffhd<-16) relate_old_inlaw=4. if (relate_old_inlaw=14 & agediffhd>10) relate_old_inlaw=6. if (related_old_inlaw=1401 & (marst=6 or (agediffhd>=-16 & agediffhd<=10))) related_old_inlaw=801. if (related_old_inlaw=1401 & agediffhd<-16) related_old_inlaw=401. if (related_old_inlaw=1401 & agediffhd>10) related_old_inlaw=601. value labels relate 01 "Head/Householder" 02 "Spouse" 03 "Child" 04 "Child-in-law" 05 "Parent" 06 "Parent-in-Law" 07 "Sibling" 08 "Sibling-in-Law" 09 "Grandchild" 10 "Other relatives" 11 "Partner, friend, visitor" 12 "Other non-relatives" 13 "Institutional inmates" . value labels related 0101 "Head/Householder" 0201 "Spouse" 0202 "2nd/3rd Wife (Polygamous)" 0301 "Child" 0302 "Adopted Child" 0303 "Stepchild" 0304 "Adopted, n.s." 0401 "Child-in-law" 0402 "Step Child-in-law" 0501 "Parent" 0502 "Stepparent" 0601 "Parent-in-Law" 0602 "Stepparent-in-law" 0701 "Sibling" 0702 "Step/Half/Adopted Sibling" 0801 "Sibling-in-Law" 0802 "Step/Half Sibling-in-law" 0901 "Grandchild" 0902 "Adopted Grandchild" 0903 "Step Grandchild" 0904 "Grandchild-in-law" 1000 "Other Relatives:" 1001 "Other Relatives" 1011 "Grandparent" 1012 "Step Grandparent" 1013 "Grandparent-in-law" 1021 "Aunt or Uncle" 1022 "Aunt,Uncle-in-law" 1031 "Nephew, Niece" 1032 "Neph/Niece-in-law" 1033 "Step/Adopted Nephew/Niece" 1034 "Grand Niece/Nephew" 1041 "Cousin" 1042 "Cousin-in-law" 1051 "Great Grandchild" 1061 "Other relatives, nec" 1100 "Partner, Friend, Visitor" 1110 "Partner/friend" 1111 "Friend" 1112 "Partner" 1113 "Partner/roommate" 1114 "Unmarried Partner" 1115 "Housemate/Roomate" 1120 "Relative of partner" 1130 "Concubine/Mistress" 1131 "Visitor" 1132 "Companion and family of companion" 1139 "Allocated partner/friend/visitor" 1200 "Other non-relatives" 1201 "Roomers/boarders/lodgers" 1202 "Boarders" 1203 "Lodgers" 1204 "Roomer" 1205 "Tenant" 1206 "Foster child" 1210 "Employees:" 1211 "Servant" 1212 "Housekeeper" 1213 "Maid" 1214 "Cook" 1215 "Nurse" 1216 "Other probable domestic employee" 1217 "Other employee" 1219 "Relative of employee" 1221 "Military" 1222 "Students" 1223 "Members of religious orders" 1230 "Other non-relatives" 1239 "Allocated other non-relative" 1240 "Roomers/boarders/lodgers and foster children" 1241 "Roomers/boarders/lodgers" 1242 "Foster children" 1250 "Employees" 1251 "Domestic employees" 1252 "Non-domestic employees" 1253 "Relative of employee" 1260 "Other non-relatives (1990 includes employees)" 1270 "Non-inmate 1990" 1281 "Head of group quarters" 1282 "Employees of group quarters" 1283 "Relative of head, staff, or employee group quarters" 1284 "Other non-inmate 1940-1959" 1291 "Military" 1292 "College dormitories" 1293 "Residents of rooming houses" 1294 "Other non-inmate 1980 (includes employees and non-inmates in" 1295 "Other non-inmates 1960-1970 (includes employees)" 1296 "Non-inmates in institutions" 1301 "Institutional inmates" . save outfile='ipumsdat\old_inlaw.sav' /drop=agehd agediffhd.