************************************************** **Syntax producing the USA heritage time use ** **demographic data file from the BSL-ATUS 2006 ** **written by Evrim Altintas, Centre for Time Use** **Research, Department of Sociology, University ** **of Oxford, Oxford OX1 3UQ United Kingdom ** **2 January 2012 ** **************************************************. ******************** *under5 and under18* ********************. GET FILE='C:\evrim\AHTUS\2006\atusrost_2006.sav'. rename variables tucaseid=pid. freq teage. *20060201060073 reported four people of unkown relation and of unknown age. *Checked in respondent file, and this household reports no children. *Treat these cases as adults. compute u5=0. compute u18=0. compute young1=999. compute young2=999. compute young3=999. compute adult=0. compute parpres=0. compute youngd=0. compute youngd=0. If (terrp=18 or terrp=19) and teage<18 youngd=1. freq youngd. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=pid /yngd=MAX(youngd). *this file includes all household members plus *own non-household children. Determine ages and numbers *of household children, excluding non-household children *as this category is not available for the earlier years. If (teage>-1 and teage<5) and terrp<40 u5=1. If (teage>-1 and teage<18) and terrp<40 u18=1. cro terrp by u18. *need to draw the age of the diarist from this file as the *roster file reflects age on the day of the diary. compute age=0. If terrp=18 or terrp=19 age= teage. if (teage<0 or teage>17) and terrp< 40 adult=1. *people coded as the parent of the diarist or as an other related person *of a child diarist counted for calculation of CPHOME as these other related *persons mostly are grandparents, and if another relative and no parent is present, *it is likely that the other relative is the guardian of a dependent child, and *cphome aims to capture whether the unmarried child lives with a parent or *guardian. But if the diarist is not a child, other related person *older than her is not counted for CPHOME. If terrp=24 or (yngd=1 and terrp=26) parpres=1. freq age u5 u18 adult parpres. Do if terrp=22 or terrp=27 or terrp=23. compute young1=teage. Else if terrp<40. compute young2=teage. End if. if terrp=18 or terrp=19 or terrp=25 young3=teage. freq young1 young2 young3. recode young1 young2 young3(-3=999). freq young1 young2 young3. AGGREGATE /OUTFILE='C:\evrim\AHTUS\2006\tempa\nu5.sav' /BREAK=pid /under5 "num aged<5" = SUM(u5) /nu18 "num aged<18" = SUM(u18) /age = max(age) /agekid "age youngest child of diarist" = min(young1) /agekid2 "age youngest person who is not child of diarist"= min (young2) /agekid3 "youngest of diarist and her/his siblings" = min (young3) /nadult "number adults" = sum (adult) /parpres "lives with parent" = max(parpres). Get File='C:\evrim\AHTUS\2006\tempa\nu5.sav'. freq under5 nu18 age agekid agekid2 agekid3 nadult parpres. *set up information to create total number of adults in hh *who are employed. GET FILE='C:\evrim\AHTUS\2006\atuscps_2006.sav' /keep tucaseid tulineno prempnot prpertyp pehruslt pehrftpt pemlr hehousut. freq hehousut. fre prempnot. *********** * EMPSTAT * ***********. *people in the armed forces were not asked their *employment status - assume that they are full-time. do if prpertyp=3. compute empstat=1. *not all people asked or answered the FT/PT question, *so if not answered but reported working 35+hours coded as FT. else if prempnot=1 and (pehruslt>34). compute empstat=1. else if prempnot=1 and pehrftpt =1. compute empstat=1. else if prempnot=1 and (pehruslt>=0 and pehruslt<35). compute empstat=2. else if prempnot=1 and pehrftpt =2. compute empstat=2. *if not reported being in labour market code as not working. else if pemlr>2. compute empstat=3. else if prpertyp=1. compute empstat=-7. else. compute empstat=-8. end if. VAR LABEL empstat "employment status of respondent". VAL LAB EMPSTAT 1 employed full-time 2 employed part-time 3 not employed -3 routed out in the 1992-94 survey -7 not applicable -8 missing or dirty on the case record -9 could not be constructed. fre empstat. cro prpertyp prempnot by empstat. compute nwork=0. if empstat=1 or empstat=2 nwork=1. *if the hh ref person is not working, create a *missing marker for this case. compute nwmiss=0. if (empstat<0 or empstat=3) and tulineno=1 nwmiss=1. cro empstat by nwmiss nwork. rename variables (tucaseid=pid). AGGREGATE /OUTFILE='C:\evrim\AHTUS\2006\tempa\nworkag.sav' /BREAK=pid /nwork = SUM(nwork) /nwmiss = MAX(nwmiss). ******************* *ERSPEMCH & ERHHCH* *******************. get file='C:\evrim\AHTUS\2006\EH\ehresp_2006.sav' /keep tucaseid tulineno erspemch erhhch. *erspemch: change in sp/partner's emp status from last CPS to ATUS. *erhhch: change in hhold composition from the CPS to ATUS. sort cases by tucaseid tulineno. save outfile='C:\evrim\AHTUS\2006\tempa\fromeh.sav'. ********* * EMPSP * *********. GET FILE='C:\evrim\AHTUS\2006\atusresp_2006.sav' /keep tucaseid tulineno tudis1 tudis tudis2 trhhchld trchldnm tryhhchd trohhch tespuhrs trdpftpt telfs turetot teschenr temjot tehruslt teern trernwa trmjind1 trdtocc1 trimind1 trmjocgr trmjocc1 trsppres tuspwk tespemnt trspftpt teio1cow. freq trsppres tuspwk tespemnt trspftpt. cro trsppres tespemnt by trspftpt. *compute employment status of the spouse. compute empsp=-8. Do If trsppres=3. compute empsp=-7. Else If trspftpt=1. compute empsp=1. Else If trspftpt>1. compute empsp=2. Else if tespemnt=2. compute empsp=4. End if. var lab empsp employment status of spouse or partner. val lab empsp -9 not asked in study -8 item missing -7 no spouse or not asked 1 spouse works full-time 2 spouse works part-time 3 spouse works, hours unknown 4 spouse not working. freq empsp. cro empsp by trsppres tespemnt trspftpt. ******* *OCCUP* *******. Freq trmjind1 trdtocc1 trimind1 trmjocgr trmjocc1. cro telfs by trdtocc1. Recode trdtocc1 (1=1) (2=2) (3=4) (4=4) (5=3) (6=5) (6=5) (7=6) (8=7) (9=9) (10=8) (11=10) (12=11)(13=17)(15=15) (16=12) (17=13) (18=14)(else=16) into occup. If telfs>2 occup=-7. var lab occup occupation. val lab occup -9 not asked in study -8 item missing -7 not working 1 management 2 finance & accounts 3 "science (life, physical, social)" 4 engineer, technical & architecture 5 community & social services 6 legal professions 7 education 8 health professionals 9 other professionals 10 health care support 11 protective services 12 sales 13 office support, administration 14 farming, fishing, forestry 15 services 16 construction & production 17 "self-employed non-professional". freq occup. cro occup by telfs trdtocc1. compute disflag=0. var lab disflag flag for has disability at time of diary. val lab disflag 0 no 1 yes. cro tudis by tudis1 tudis2. If tudis1=1 or tudis=1 or tudis2=1 disflag=1. cro disflag by tudis tudis1 tudis2. save outfile='C:\evrim\AHTUS\2006\tempa\fromresp.sav' /keep tucaseid tulineno disflag trhhchld trchldnm tryhhchd trohhch trsppres tuspwk trdpftpt telfs turetot teschenr temjot tehruslt teern trernwa empsp occup. *in some cases, the background information is in the CPS file, but recent *changes are in the respondent file. The information from the two files *needs to be matched together. *gemetsta variable no longer exists in 2006 survey *we only use GTMETSTA to create urban variable. get file='C:\evrim\AHTUS\2006\atuscps_2006.sav' /keep tucaseid tulineno hrhhid gestfips gereg GTMETSTA prtfage pesex ptdtrace pehspnon pehspnon peeduca pemaritl hrhtype prnmchld hrnumhou pehrftpt premphrs prempnot prexplf prftlf pemlr peschenr peschft pehrrsn1 pehrrsn2 prpertyp peafnow prftlf pehruslt prptrea pehrrsn1 pehrrsn2 pehrrsn3 pedwrsn pedwavr prpthrs peernhro pehract1 pehract2 pehractt prhrusl hufaminc prmarsta perrp prdtcow1 prcowpg prcitshp hetenure. SORT CASES BY tucaseid (A) tulineno (A). MATCH FILES /FILE=* /FILE='C:\evrim\AHTUS\2006\tempa\fromresp.sav'/in=inresp /BY tucaseid tulineno. freq inresp. *this leaves just the respondents who completed diaries. The CPS file includes information *on all persons interviewed in the households. sel if inresp=1. execute. MATCH FILES /FILE=* /FILE='C:\evrim\AHTUS\2006\tempa\fromeh.sav' /BY tucaseid tulineno. execute. *********** * SURVEY * ***********. compute survey = 7. val lab survey 0 "1965-66 USA Szalai Jackson sample" 1 "1965-66 USA national sample" 2 "1975-76 longitudinal survey" 3 "1985 Univ Michigan survey" 4 "1992-94 NHAPS survey" 5 "1995 NHAPS extension survey" 6 "1998-2001 SRC survey" 7 "2003-2010 ATUS". ******** * WAVE * ********. compute wave=4. val lab wave -8 missing 1 first wave or only wave 2 '2nd wave / 2nd year ATUS' 3 '3rd wave / 3rd year ATUS' 4 '4th wave / 4th year ATUS' 5 5th year ATUS 6 6th year ATUS 7 7th year ATUS 8 8th year ATUS 9 9th year ATUS. ************** * HHID & PID * **************. * according with the codebook "The TUCASEID *identifies each ATUS case ". ***make sure that they are numeric***. compute pid=tucaseid. compute hhid=hrhhid. execute. ********* * STATE * *********. fre gestfips. compute state=gestfips. recode state (-9=-9) (1=1) (2=2) (4=3) (5=4) (6=5) (8=6) (9=7) (10=8) (11=9) (12=10) (13=11) (15=12) (16=13) (17=14) (18=15) (19=16) (20=17) (21=18) (22=19) (23=20) (24=21) (25=22) (26=23) (27=24) (28=25) (29=26) (30=27) (31=28) (32=29) (33=30) (34=31) (35=32) (36=33) (37=34) (38=35) (39=36) (40=37) (41=38) (42=39) (44=40) (45=41) (46=42) (47=43) (48=44) (49=45) (50=46) (51=47) (53=48) (54=49) (55=50) (56=51). val lab state -9 data not available 1 ALABAMA 2 ALASKA 3 ARIZONA 4 ARKANSAS 5 CALIFORNIA 6 COLORADO 7 CONNECTICUT 8 DELAWARE 9 DISTRICT OF COLUMBIA 10 FLORIDA 11 GEORGIA 12 HAWAII 13 IDAHO 14 ILLINOIS 15 INDIANA 16 IOWA 17 KANSAS 18 KENTUCKY 19 LOUISIANA 20 MAINE 21 MARYLAND 22 MASSACHUSETTS 23 MICHIGAN 24 MINNESOTA 25 MISSISSIPPI 26 MISSOURI 27 MONTANA 28 NEBRASKA 29 NEVADA 30 NEW HAMPSHIRE 31 NEW JERSEY 32 NEW MEXICO 33 NEW YORK 34 NORTH CAROLINA 35 NORTH DAKOTA 36 OHIO 37 OKLAHOMA 38 OREGON 39 PENNSYLVANIA 40 RHODE ISLAND 41 SOUTH CAROLINA 42 SOUTH DAKOTA 43 TENNESSEE 44 TEXAS 45 UTAH 46 VERMONT 47 VIRGINIA 48 WASHINGTON 49 WEST VIRGINIA 50 WISCONSIN 51 WYOMING. cro state by gestfips. freq state. *************************** * REGIONC (census region) * ***************************. compute regionc=gereg. var lab regionc "census region". VAL LAB REGIONC 1 NORTHEAST 2 MIDWEST 3 SOUTH 4 WEST -8 MISSING OR DIRTY ON THE CASE RECORD -9 QUESTION NOT ASKED. *********************** *REGIONE (epa region) * ***********************. COMPUTE regione=-9. VARIABLE LABELS REGIONE "EPA REGION". VALUE LABELS regione -9 "QUESTION NOT ASKED" -8 "MISSING OR DIRTY IN THE CASE RECORD" 0 "MOUNTAIN" 1 "NEW ENGLAND" 2 "NORTH ATLANTIC" 3 "MID ATLANTIC" 4 "SOUTH ATLANTIC" 5 "MIDWEST" 6 "SOUTH CENTRAL" 7 "CENTER" 8 "NORTH CENTRAL" 9 "PACIFIC". freq regionc regione. ********* * URBAN * *********. fre GTMETSTA. compute urban =GTMETSTA. recode urban (3=-8) (2=0). var lab urban "URBANICITY OF RESPONDENT'S HOME". VAL LAB URBAN 0 RURAL 1 URBAN -9 not asked -8 missing. cro GTMETSTA by urban. ******* * SEX * *******. compute sex=pesex. VAL LAB SEX 1 MALE 2 FEMALE -2 REFUSAL -8 MISSING OR DIRTY ON THE CASE RECORD. freq sex. ********* *ETHNIC * *********. fre ptdtrace. fre PEHSPNON. cro PEHSPNON by ptdtrace. Do if ptdtrace=1. compute ethnic=1. Else if ptdtrace=2. compute ethnic=2. Else if ptdtrace=4. compute ethnic=3. Else if ptdtrace>0. compute ethnic=4. Else. compute ethnic=-8. End if. VARIABLE LABELS ETHNIC "ETHNIC GROUP OF RESPONDENT". VAL LAB ETHNIC 1 White 2 Black 3 Asian 4 Some other race 5 Hispanic -8 missing -9 question not asked. freq ethnic. cro ethnic by ptdtrace pehspnon. ********** *ETHNIC2 * **********. recode ptdtrace (-1=-8) (1=1) (2=2) (3 thru Highest=3) into ethnic2. VAL LAB ETHNIC2 1 WHITE 2 BLACK 3 OTHER -8 missing -9 question not asked cro ethnic2 by ptdtrace. ******* *HISP * *******. recode pehspnon (2=0) (else=copy) into hisp. VAL LAB HISP 0 NO 1 YES -1 "DON'T KNOW" -8 MISSING OR DIRTY ON THE CASE RECORD. cro pehspnon by hisp. ******* *EDUC * *******. recode peeduca (-1=-8) (31 thru 34=1) (35 thru 38=2) (39=3) (40=4) (41 thru 43=5) (44 thru highest=6) into educ. VAR LABEL educ "RESPONDENT'S EDUCATIONAL LEVEL". VAL LAB EDUC 1 0 - 8TH GRADE 2 9 - 11TH GRADE 3 HIGH SCHOOL GRADUATE 4 SOME COLLEGE 5 COLLEGE GRADUATE 6 POST COLLEGE -7 REFUSAL or NOT APPLICABLE -8 MISSING OR DIRTY ON THE CASE RECORD. cro peeduca by educ. ********** *CIVSTAT * **********. cro pemaritl by trsppres. freq pemaritl trsppres. Do if trsppres=1 or trsppres=2. compute civstat=1. Else if trsppres=3 and (pemaritl=4 or pemaritl=5). compute civstat=2. Else if trsppres=3 and pemaritl=3. compute civstat=3. Else. compute civstat=4. End if. VAL LAB CIVSTAT 1 MARRIED 2 SEPARATED,DIVORCED 3 WIDOWED 4 NEVER MARRIED -8 missing or dirty on the case record -9 question not asked. freq civstat. cro trsppres pemaritl by civstat. cro perrp by civstat. ******* *COHAB* *******. compute cohab=0. if civstat=-8 cohab=-8. if trsppres=2 cohab=1. var lab cohab with unmarried cohabiting partner. val lab cohab -9 not asked -8 missing 0 no 1 yes. freq cohab. cro cohab by trsppres. ********** *MARRFLAG* **********. compute marrflag=-9. var lab marrflag "Flag for 1975 panel change in marital status". val lab marrflag -9 not available 0 not applicable 1 got married 2 no spouse in hhold. match files files=*/in=mainf files='C:\evrim\AHTUS\2006\tempa\nu5.sav'/in=nu5f /by pid. cro mainf by nu5f. ***** *AGE* *****. freq age. *age of the diarist carried in from the roster file. Nonetheless, the CPS file *does reveal if people with a reported age of 80 actually are aged 80 or have *had their aged capped. Use this marker variable to distinguish people who are *aged 80 from those aged 81 or more. If age=85 prtfage=1. means age by prtfage /cells = min max mean. if prtfage=1 age=81. means age by prtfage /cells = min max mean. ******** *AGECAT* ********. Recode age (18 thru 24=1) (25 thru 34=2) (35 thru 44=3) (45 thru 54=4) (55 thru 64=5) (65 thru high=6) (else=-8) INTO agecat. var lab agecat age categorised to be consistent with census. val lab agecat -9 not asked -8 missing 1 18-24 2 25-34 3 35-44 4 45-54 5 55-64 6 65 plus. freq agecat. cro age by agecat. ********************************************************* *somewhat different household type information in the * *roster and the respondent and cps files. compare these * *variables to make variables related to children and * *number of adults * *********************************************************. cro hrnumhou by prpertyp prnmchld trchldnm. compute totper= nadult + nu18. freq totper. cro hrnumhou by totper. ********** * NADULT * **********. var lab nadult number of adults in hh. *Roster file is more up to date than CPS. *So Roster file used for household composition. *********** * UNDER18 * ***********. Recode nu18 (11 thru Highest=11) (ELSE=Copy) INTO under18. VAR LAB under18 'number of children aged <18 in household'. * check that most younger diarists have siblings. temp. select if age<18. freq under18. *check against age of the youngest child. cro tryhhchd by under18. VAL LAB UNDER18 11 MORE THAN 10 -7 NOT APPLICABLE OR REFUSAL -8 MISSING OR DIRTY ON THE CASE RECORD -9 QUESTION NOT ASKED. freq under18. ********* *UNDER5 * *********. *base variable from the roster file. freq under5. ********** *AGEYNGST * ***********. *compare variable for youngest age from roster file with *ATUS age youngest child variable. cro tryhhchd by agekid. *roster covers age of all children living with diarists, no *age maximum. roster file has more up-to-date information. *just use roster file. *to this point, the agekid covers cases where the diarist is *the natural parent or adoptive or foster parent of a child. *create ageyngst to also cover cases where the relationship *between the diarist and a child is non-parental or where *the diarist is a child and the diarist is the youngest *household member or a younger sibling holds this distinction. desc agekid agekid2 agekid3. compute ageyngst=-7. Do if agekid2 ge agekid. compute ageyngst=agekid. Else if agekid2<18. compute ageyngst=agekid2. Else if agekid<999 and agekid>agekid2. compute ageyngst=agekid. Else if parpres=1. compute ageyngst=agekid3. End if. VARIABLE LABELS ageyngst "age of youngest child". VALUE LABELS ageyngst -9 "QUESTION NOT ASKED" -8 "MISSING OR DIRTY ON THE CASE RECORD" -7 "NOT APPLICABLE" 0 "less THAN 1". fre ageyngst. *check that child diarist's ages are >= age youngest. temp. select if age<18. cro ageyngst by age. *check that no children are present in households with *no age of the youngest child. means ageyngst by under18 /cells min max. *check that no household where a parent of the diarist is *present is missing age youngest child. cro ageyngst by parpres. *********** *NKIDFLAG * ***********. cro under18 by under5. compute nkidflag=-9. var lab nkidflag "Flag for inconsistencies in numbers between under18 under5 ageyngst". VAL LAB NKIDFLAG 0 OK 1 more under 5 -9 Not constructed. *********** * PARPRES * *********** temp. select if age<18. cro civstat by nadult parpres. val lab parpres 0 no 1 yes. freq parpres. *********** * FAMSTAT * ***********. temp. select if age<18. freq parpres. Do if under18=0 and (age>17 and age<40). compute famstat=0. Else if under18=0 and age>39. compute famstat=3. Else if age>17 and under5>0. compute famstat=1. Else if age>17 and under18>0. compute famstat=2. Else if age<18 and parpres=1. compute famstat=4. Else if age<18. compute famstat=5. else. compute famstat=-8. end if. VAL LAB FAMSTAT 0 Adult aged 18 to 39 with no coresident children <18 1 Adult 18+ living with 1+ coresident children aged <5 2 Adult 18+ living with 1+ coresident children 5-17, none <5 3 Adult aged 40+ with no coresident children <18 4 Respondent aged <18 and living with parents or guardians 5 respondent aged <18 and living in other arrangement -8 missing -9 could not be constructed. fre famstat. cro under5 under18 parpres by famstat. means ageyngst age by famstat /cells = min max. save outfile = 'C:\evrim\AHTUS\2006\tempa\harmmid.sav'. get file= 'C:\evrim\AHTUS\2006\tempa\harmmid.sav'. ********** * HHTYPE * **********. fre hrhtype. *household type. fre prnmchld. *presence of own children. cro hrhtype by civstat prnmchld ageyngst. compute hhtype=0. Do if civstat=1 and under18>0. compute hhtype=1. Else if civstat=1 and under18=0. compute hhtype=2. else if (hrhtype=3 or hrhtype=6) and nadult=1 and under18=0. compute hhtype=6. else if (hrhtype=3 or hrhtype=6). compute hhtype=5. else if (hrhtype=4 or hrhtype=7) and nadult=1 and under18=0. compute hhtype=7. else if (hrhtype=4 or hrhtype=7) and under18>0. compute hhtype=3. else if hrhtype=7 and under18=0. compute hhtype=4. else if (hrhtype=1 or hrhtype=2) and age<18. compute hhtype=1. else. compute hhtype=8. end if. val lab hhtype 1 married with child 2 married without child 3 female hh with child 4 female hh without child 5 male hh 6 single male 7 single female 8 other -8 missing or dirty on the case record -9 data not available. fre hhtype. cro hhtype by hrhtype. cro hhtype by civstat under18 nadult famstat. *There is one case where hhtype=1 (married) but civstat=2(separated). *Examine the case visually. temp. select if (hhtype=1 and civstat=2). freq tucaseid. *20061009062332 is a 16 year old female who reported to be separated from her partner. *Checked this case in respondent file and ther she is reported not to have any spouse/unmarried partner. *Take the recent file as a reference. If tucaseid=20061009062332 civstat=4. compute test= under18 + nadult. cro hhtype by test. cro hhtype by under18 nadult. *Check the inconsistencies between nadult and hhtype. temp. select if hhtype=1 and nadult=1. freq tucaseid famstat. *Checked the roster file for this case. *20060201062533 is a 17 year old diarist married with 21 year old and have one child. *Both information is correct. temp. select if nadult<1. freq tucaseid famstat. *Checked the roster file for these cases. *20060201060028 is a 16 year old living with her brother. No adult reported. *20060807060039 also a 16 year old female living with her brother and *a younger hhold child. Both information is correct. cro hhtype by famstat. temp. select if famstat=4 and hhtype=8. freq tucaseid. *20060807061417 is a 17 year old living with one of her parents. *Code this as male hhold. If tucaseid=20060807061417 hhtype=5. cro nadult by erhhch. *********** * KIDFLAG * ***********. compute kidflag=-7. var lab kidflag "Cases where inconsistency between household type and number of children was corrected". VAL LAB KIDFLAG -7 Not constructed 0 NA 1 inconsistencies on number kids in heritage file. freq kidflag. ************ * FULLTIME * ************ freq TRDPFTPT TELFS TURETOT. cro TELFS by TURETOT. if trdpftpt=1 fulltime=1. if trdpftpt=2 fulltime=0. if trdpftpt=-1 fulltime=0. VAR LABEL fulltime "RESPONDENT WORKS FULL TIME". VAL LAB FULLTIME -8 missing 0 no 1 "yes (21+ hrs 65-85; 35+ hrs 92-03)" fre fulltime. cro fulltime by trdpftpt. ************ * PARTTIME * ************. if trdpftpt=1 parttime=0. if trdpftpt=2 parttime=1. if trdpftpt=-1 parttime=0. VAR LABEL PARTTIME "RESPONDENT WORKS PART TIME". VAL LAB PARTTIME -8 missing 0 no 1 "yes (<21 hrs 65-85; <35 hrs 92-03)" fre parttime. cro parttime by trdpftpt. ************ * NOEMPLOY * ************. compute noemploy=0. if telfs<1 noemploy=-8. if telfs>2 noemploy=1. VAR LABEL noemploy "RESPONDENT IS NOT EMPLOYED". VAL LAB NOEMPLOY 0 NO 1 YES -7 NOT APPLICABLE or refusal -8 missing or dirty on the case record. fre noemploy. cro noemploy by telfs. *********** * EMPSTAT * ***********. If trdpftpt=1 empstat=1. If trdpftpt=2 empstat=2. If telfs>2 empstat=3. VAR LABEL empstat "employment status of respondent". VAL LAB EMPSTAT 1 employed full-time 2 employed part-time 3 not employed -3 routed out in the 1992-94 survey -7 not applicable -8 missing or dirty on the case record -9 could not be constructed. fre empstat. cro empstat by telfs trdpftpt. ********* * UNEMP * *********. compute unemp=0. If telfs=3 or telfs=4 unemp=1. VAR LABEL unemp "RESPONDENT IS UNEMPLOYED". VAL LAB UNEMP 0 NO 1 YES -3 routed out in the 1992-94 survey -7 not applicable or refusal -8 missing or dirty on the case record. fre unemp. cro unemp by telfs. means age by unemp telfs /cells min max mean. *some very young - below school leaving age, listed *as looking for work. temp. select if age<18. cro telfs by teschenr. *many young people listed as unemployed - *change so that students listed as looking for *work are not unemployed, only count young *people who are layed off or not students but looking for *work as unemployed for consistency with earlier surveys. if age<18 and telfs=4 and teschenr=1 unemp=0. temp. select if age<18. cro telfs by unemp. *********** * RETIRED * ***********. compute retired=0. if turetot=1 retired=1. VAR LABEL retired "RESPONDENT IS RETIRED". VAL LAB retired -9 not asked -8 missing -3 routed out in the 1992-94 survey 0 no 1 yes. fre retired. cro retired by turetot. means age by retired /cells=min max median. ******* *DISAB* *******. compute disab=0. if disflag=1 disab=1. var lab disab "has disability, l-term lim health cond". val lab disab -9 not asked -8 missing -3 routed out in the 1992-94 survey 0 no 1 yes. freq disab. *********** * STUDENT * ***********. compute student=0. if teschenr=1 student=1. VAR LABEL student "RESPONDENT IS A STUDENT". VAL LAB STUDENT 0 NO 1 YES. freq student. cro student by teschenr. ************ * HOMEMAKR * ************. fre PRPTREA premphrs PEHRRSN1 PEHRRSN2 PEHRRSN3. *derivation. * if main reason for working PT is chid care or family/personal obligations. do if prpertyp=2 and (PEHRRSN1=4 or PEHRRSN1=5). compute homemakr=1. *if main reason for NOT working FT is chid care or family/personal obligations. else if prpertyp=2 and (PEHRRSN2=1 or PEHRRSN2=2). compute homemakr=1. *if detailed reason for PT work is usually PT and childcare problems or family/personal obligations. else if prpertyp=2 and (PRPTREA=17 or PRPTREA=18). compute homemakr=1. *if main reason for not looking for work during last 4 weeks is childcare or family obligations. else if prpertyp=2 and (pedwrsn=6 or pedwrsn=7). compute homemakr=1. *If member of the armed forces not homemakr. else if prpertyp=3. compute homemakr=0. *if working full time not homemakr. else if prempnot=1 and (pehruslt>34). compute homemakr=0. else if prempnot=1 and pehrftpt =1. compute homemakr=0. *if detailed reason for PT work is NOT childcare problems or family/personal obligations. else if prpertyp=2 and ((PRPTREA>0 and PRPTREA<7) or (PRPTREA>8 and PRPTREA<19) or (PRPTREA>18 )). compute homemakr=0. *if main reason for not looking for work during last 4 weeks is NOT childcare or family obligations. else if prpertyp=2 and ((pedwrsn>0 and pedwrsn<6) or pedwrsn>7). compute homemakr=0. *if Reason not at work is NOT childcare or family obligations. else if prpertyp=2 and ((premphrs>0 and premphrs<5) or (premphrs>7 and premphrs<11)). compute homemakr=0. *if child not appllicable. else if prpertyp=1. compute homemakr=-7. else. compute homemakr=0. end if. VAR LABEL homemakr "RESPONDENT IS A HOMEMAKER". VAL LAB HOMEMAKR 0 NO 1 YES. if telfs=1 or telfs=2 homemakr=0. fre homemakr. cro pehruslt by homemakr. cro prpertyp by homemakr. cro PRPTREA by homemakr. cro pesex by homemakr. cro pedwrsn by homemakr. cro PEHRRSN1 by homemakr. cro PEHRRSN2 by homemakr. ******** *WKHRS * ********. recode tehruslt (-4=-8) (-1=-7) (81 thru hi=81) (else=copy) INTO wkhrs. VAL LAB WKHRS 61 BETWEEN 61 AND 80 HOURS 81 MORE THAN 80 HOURS -7 NA -8 MISSING DIRTY IN THE CASE RECORD. fre WKHRS. ******** *NWORK * ********. match files files=* files='C:\evrim\AHTUS\2006\tempa\nworkag.sav' /by pid. execute. select if inresp=1. If nwmiss=1 and (empstat=1 or empstat=2) nwork=nwork+1. var lab NWORK number of hh members working. freq nwork. ********** *EMPFLAG * **********. compute empflag=-9. VAL LAB EMPFLAG 0 OK 1 work 20hours+ -9 Not constructed. *********** *WKHRFLAG * ***********. compute wkhrflag=-9. VAL LAB WKHRFLAG 0 OK 1 hours missing -7 NA -9 Not constructed. ******** *WAGELM* ********. missing values teern trernwa (-1). desc teern trernwa. *note that the codebook for the ATUS notes that these *variables include 2 implied decimals. Also, these are *weekly earnings - inflated to 4 weekly earnings for *comparability with 1975. missing values all (). Do if trernwa>0. compute wagelm = (trernwa/100)*4. Else if trernwa=0. compute wagelm=0. Else if trernwa=-1 and empstat=3. compute wagelm=-7. Else if trernwa=-1. compute wagelm=-8. End if. var lab wagelm employment income from last month. val lab wagelm -9 not asked -8 missing -7 not applicable. desc wagelm. temp. select if wagelm>0. desc wagelm. means wagelm by empstat /cell = min max median. *********** *INCOMEQT * ***********. FRE HUFAMINC. TEMP. SELECT IF HUFAMINC>-1. FREQ HUFAMINC /NTILES=4. compute incomeqt=0. do if HUFAMINC>0 and HUFAMINC<8. compute incomeqt=1. else if HUFAMINC>=8 and HUFAMINC<11. compute incomeqt=2. else if HUFAMINC>10 and HUFAMINC<14. compute incomeqt=3. else if HUFAMINC>=14. compute incomeqt=4. else. compute incomeqt=-8. end if. VAL LAB INCOMEQT 1 lowest quartile 2 2nd lowest quartile 3 2nd highest quartile 4 highest quartile -8 missing -9 cannot be constructed. TEMP. SEL IF HUFAMINC>0. fre incomeqt. FRE INCOMEQT. *********** *INCOME65 * ***********. compute income65=-7. var lab income65 "Total household income 1965-66". *********** *INCOME75 * ***********. compute income75=-7. var lab income75 "Total family income 1975-76". val lab income65 income75 -7 not applicable. ********** *INCOME03* **********. FRE HUFAMINC. CRO HUFAMINC BY prpertyp. recode HUFAMINC (-3=-8) (-2=-8) (-1=-8) (else=copy) INTO income03. var lab income03 Household income 2003-2010. VAL LAB income03 1 "<$5,000" 2 $5,000-7,499 3 $7,500-9,999 4 $10,000-12,499 5 $12,500-14,999 6 $15,000-19,999 7 $20,000-24,999 8 $25,000-29,999 9 $30,000-34,999 10 $35,000-39,999 11 $40,000-49,999 12 $50,000-59,999 13 $60,000-74,999 14 $75,000-99,999 15 $100,000-149,999 16 "$150,000+" -8 missing -9 not available. freq income03. cro income03 by HUFAMINC. ********** *HETENURE* **********. freq hetenure. recode hetenure (-1=-8) (-2=-8) (-3=-8) (else=copy) into ownhome. var lab ownhome own or rent home. val lab ownhome -9 not available in survey -8 missing 1 owner or buying home 2 rent 3 other. cro ownhome by hetenure. sort cases by survey wave hhid pid. *check which variables are relevant to keep in the *child diary files. temp. select if agecat=-8. freq ethnic ethnic2 hisp educ civstat cohab famstat hhtype nadult under18 under5 ageyngst fulltime parttime noemploy empstat unemp retired disab student homemakr nwork wagelm incomeqt income03. temp. select if agecat=-8. cro empstat by fulltime parttime noemploy. temp. select if age<18. freq occup empsp. format empsp to wkhrflag (f4.0). format incomeqt to ownhome (f4.0). sort cases by pid. save outfile='C:\evrim\AHTUS\2006\tempa\harmmid2.sav'. **************** *QUALITY CHECKS* ****************. get file ='C:\evrim\AHTUS\2006\tempa\harmmid2.sav'. freq cohab civstat empsp famstat hhtype. cro civstat by cohab. *civstat* *********. temp. select if age<18 and civstat=1. freq pid. *20060112050723 is a 15 year old living with her parents and unmmarried partner. *20060201062533 is a 17 year old living married with 21 year old, and have a child. *The information on 20060503061180 mixed. She is a 15 year old living with 38 and 65 year old females.: *In roster file 38 year old female is reported to be the spouse of her. *In respondent file she reports no spouse. *In CPS 38 year old reported to be her mother, and 65 grandmother. *We will take CPS information as a reference. temp. select if pid=20060503061180. freq hhtype famstat cohab parpres civstat empsp erspemch erhhch. If pid=20060503061180 civstat=4. If pid=20060503061180 empsp=-7. temp. select if pid=20060112050723. freq hhtype famstat cohab parpres civstat empsp erspemch erhhch. temp. select if pid=20060201062533. freq hhtype famstat cohab parpres civstat ageyngst/ nadult under5 under18 empsp erspemch erhhch. *famstat* *********. temp. select if age<18. freq famstat. temp. select if famstat=5. freq pid. *Visually examined those cases/ *3 of the cases provide consistent/realistic information. No changes needed. *20060112051529 lives with 38 year old non-relative, leave as famstat=5. *20060201062533 is living with her husband and child. *20060201060028 is 16 year old living with 17 year old brother, leave as famstat=5. *In roster file 20060503061679 reported to be 16 year old male living with *4 foster children? (two of them over 70?) and two other non-relatives. *Checked the case in CPS. Here is the CPS information; *6 people reported to be present. *70&73 year old partners. *Two own child at the age of 19 and 16. *Two foster child at the age of 15(diarist) and 14. *Presumably 70&73 years old are foster parent of diarists. temp. select if pid=20060503061679. freq hhtype famstat cohab parpres civstat ageyngst/ nadult under5 under18 empsp erspemch erhhch. If pid=20060503061679 parpres=1. If pid=20060503061679 famstat=4. *This person will be reported as living with guardians. *In roster file 20060504062014 is 15 year old living with 10 other people *with unknown relations whose age vary tween 0 to 32. *Checked the case from CPS file. The diarist is an other relative of the *CPS reference person. Code this case as living with guardians but no parent present. temp. select if pid=20060504062014. freq hhtype famstat cohab parpres civstat ageyngst/ nadult under5 under18 empsp erspemch erhhch. If pid=20060503061679 famstat=4. temp. select if pid=20060603060962. freq hhtype famstat cohab parpres civstat ageyngst/ nadult under5 under18 empsp erspemch erhhch. *20060603060962 is a 17 year old living with her 21 year old sister and 23 year *old non relative. Code this as living with guardians (famstat) but parent not present.. IF pid=20060603060962 famstat=4. temp. select if age<18. freq famstat. *ERSPEMCH* **********. cro erspemch by empsp. temp. select if erspemch=5 and empsp=-7. freq pid age cohab civstat. *20060503061180 is a 15 year old female living with 38 and 65 year old females.: *In roster file 38 year old female is reported to be the spouse of her. *In respondent file she reports no spouse. *In CPS 38 year old reported to be her mother, and 65 grandmother. *We will take CPS information as a reference. *empsp will be left as it is. *ERHHCH* ********. cro erhhch by hhtype famstat nadult under18. ************************************************************************ *REMOVE ANY ABSURD ADDED DECIMALS IN VARIABLE VIEW SCREEN BEFORE SAVING* ************************************************************************. var lab survey Survey period. var lab wave Wave of survey. var lab hhid Household identifier. var lab pid Person identifier. var lab state State. var lab urban urban or rural household. var lab age Age of diarist. var lab sex Sex of diarist. var lab ethnic2 "ethnic group – condensed". var lab hisp "is respondent of Hispanic origin-descent". var lab civstat marital status. var lab famstat Individual life cycle status. var lab hhtype Household type. var lab under5 number of children aged <5 in household. var lab wkhrs Number of hours worked per week. var lab empflag "flag for respondent working >20 hours who is defined as not working". var lab wkhrflag "flag for work hours missing". var lab incomeqt Household income in approximate quartiles. *last quality checks*. cro famstat by civstat cohab under5. cro under18 by famstat. cro hhtype by famstat cohab civstat. *This file also includes adults for now. SAVE OUTFILE='C:\evrim\AHTUS\2006\usa06questch.sav' /keep survey wave hhid pid state regionc regione urban ownhome age sex ethnic ethnic2 hisp educ civstat cohab famstat hhtype nadult under18 under5 ageyngst empstat occup unemp empsp disab student homemakr wkhrs nwork wagelm incomeqt income03. SAVE OUTFILE='C:\evrim\AHTUS\2006\usa06questall.sav' /keep survey wave hhid pid state regionc regione urban ownhome age sex ethnic ethnic2 hisp educ civstat cohab marrflag famstat hhtype kidflag nadult under18 under5 ageyngst nkidflag fulltime parttime noemploy empstat occup unemp retired empsp disab student homemakr wkhrs nwork empflag wkhrflag wagelm incomeqt income65 income75 income03. *these files include cases of children aged <18. To *finish the harmonising, save the adult file to exclude *the children, and save the child files into the diary *files. get file='C:\evrim\AHTUS\2006\usa06questall.sav'. select if age>17. freq survey wave state regionc regione ownhome urban age sex ethnic ethnic2 hisp educ civstat cohab marrflag famstat hhtype kidflag nadult under18 under5 ageyngst nkidflag fulltime parttime noemploy empstat unemp retired disab student homemakr wkhrs nwork empflag wkhrflag incomeqt income65 income75 income03. cro empsp by civstat. desc hhid pid wagelm age. temp. select if wagelm>-1. desc wagelm. temp. select if wagelm<0. freq wagelm. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2006\usa06quest.sav'. Get file='C:\evrim\AHTUS\2006\usa06questch.sav'. select if age<18. freq survey wave state regionc regione urban ownhome age sex ethnic ethnic2 hisp educ civstat cohab famstat hhtype nadult under18 under5 ageyngst empstat occup unemp empsp disab student homemakr wkhrs nwork wagelm incomeqt income03. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2006\usa06questch.sav'. ************************************** *put files in Harmonised Files Folder* **************************************. **child file**. sort cases by survey wave hhid pid. save outfile='C:\evrim\AHTUS\2006\Harmonised Files\usa06questch.sav' /keep survey wave hhid pid state regionc regione urban ownhome age sex ethnic ethnic2 hisp educ civstat cohab famstat hhtype nadult under18 under5 ageyngst empstat occup unemp empsp disab student homemakr wkhrs nwork wagelm incomeqt income03. **adult file**. get file='C:\evrim\AHTUS\2006\usa06quest.sav'. sort cases by survey wave hhid pid. SAVE OUTFILE='C:\evrim\AHTUS\2006\Harmonised Files\usa06quest.sav' /keep survey wave hhid pid state regionc regione urban ownhome age sex ethnic ethnic2 hisp educ civstat cohab marrflag famstat hhtype kidflag nadult under18 under5 ageyngst nkidflag fulltime parttime noemploy empstat occup unemp retired empsp disab student homemakr wkhrs nwork empflag wkhrflag wagelm incomeqt income65 income75 income03. ********************************************************** *combine two files together to use while creating badcase* **********************************************************. get file='C:\evrim\AHTUS\2006\Harmonised Files\usa06quest.sav' /keep survey wave hhid pid age sex. ADD FILES /FILE=* /FILE='C:\evrim\AHTUS\2006\Harmonised Files\usa06questch.sav' /DROP=ageyngst civstat cohab disab educ empsp empstat ethnic ethnic2 famstat hhtype hisp homemakr income03 incomeqt nadult nwork occup ownhome regionc regione state student under18 under5 unemp urban wagelm wkhrs. EXECUTE. cro age by sex. sort cases by hhid pid. save outfile='C:\evrim\AHTUS\2006\tempa\usa06sexage_all.sav'. *************************************************** ** The end of the syntax producing the AHTUS ** ** demographic data file from the BSL-ATUS 2006 ** ***************************************************.