**************************************************** **Syntax producing the USA heritage time use files** **BSL-ATUS 2003 ** **updated by Dr. Kimberly Fisher & Evrim Altintas ** **Centre for Time Use Research, University of ** **Oxford, Department of Sociology, Manor Road ** **Oxford OX1 3UQ United Kingdom ** **24 November 2009 ** **written by Dr. Kimberly Fisher ** **Institute for Social and Economic Research ** **University of Essex, Wivenhoe Park Colchester ** **United Kingdom ** **LAst update 2 November 2011 ** ****************************************************. *the information needed for the heritage format of *the ATUS data is stored across the various files. *the individual elements are now separately extracted. *note that tufinwgt replaced by tu06fwgt as the weighting *procedure changed in 2006, and the cross-time weight now *needs to be based on the same procedure for all years *as opposed to the different procedure adopted in the earlier *years. GET FILE='C:\evrim\AHTUS\2003\atusresp_2003.sav' /keep tucaseid tuyear tumonth tudidate tudiday tu06fwgt. freq tuyear tumonth tudidate tudiday. rename variables (tucaseid tuyear tumonth tudiday = pid year month diaryday). ******tudidate must be numeric, not string!***** ************************************************. compute cday= tudidate - trunc(tudidate/100)*100. freq cday. sort cases by pid. save outfile='c:\evrim\AHTUS\2003\tempa\datewght.sav' /keep pid diaryday cday month year tu06fwgt. *extract sex and age to check weights - also to refine closefamily code. GET FILE='C:\evrim\AHTUS\2003\atusrost_2003.sav'. *select for the diarists only. select if terrp=18 or terrp=19. rename variables (tucaseid teage tesex =pid age sex). freq sex. desc age. sort cases by pid. save outfile='C:\evrim\AHTUS\2003\tempa\dem.sav' /keep pid sex age. *the who else is present file lists various *codes for children aged <18, but the code *does not specify the ages - match ages from *roster file, and use code created for the *demographic file. Note in this case, unlike the *construction of variables for the demographic file, *we include the young non-household children. GET FILE='C:\evrim\AHTUS\2003\atusrost_2003.sav' /keep TUCASEID TULINENO TEAGE TERRP. freq teage terrp. *There is no missing age or relation. compute u5=0. compute u18=0. If teage<5 u5=1. If teage<18 u18=1. freq u5 u18. rename variables tucaseid=pid. sort cases by pid tulineno. save outfile='C:\evrim\AHTUS\2003\tempa\kidflag.sav'. *who else is present code not always asked. Check *to which activities this applies. Get file='C:\evrim\AHTUS\2003\atusact_2003.sav' /keep tucaseid tuact_n actcode. rename variables (tucaseid tuact_n = pid epnum). sort cases by pid epnum. save outfile="C:\evrim\AHTUS\2003\tempa\checkact.sav". ********************************* *make who else present variables* *********************************. GET FILE='C:\evrim\AHTUS\2003\atuswho_2003.sav'. rename variables (tucaseid tuact_n=pid epnum). sort cases by pid tulineno. match files files=* table='C:\evrim\AHTUS\2003\tempa\kidflag.sav' /by pid tulineno. sort cases by pid epnum. match files files=* table="C:\evrim\AHTUS\2003\tempa\checkact.sav" /BY pid epnum. freq tuwhocod trwhona. temp. select if tuwhocod<1. cro tuwhocod by trwhona. *There are 52 cases of genuinely missing who else is *present data - a very small proportion, and 91740 cases *where the who else is present information was not asked. *As the level of not answered data is so small (note that *this is sub-episode level data and not diary level data, & *the total number of diaries in this file is large), and *as for purposes of the harmonised data sets the non-recorded *who else is present information will be treated the same *when analysed alongside the heritage files, all the non- *recorded who else is present data is coded as who else *present unknown. temp. select if trwhona=1. freq actcode. *the activities for which who else is present is not known *are paid work related activities, personal care, and diarist *could not remember what they did at that time activities. *double check for instances reported as alone and with other *people at the same time. compute repa=0. If tuwhocod=18 or tuwhocod=19 alone=1. compute repothst=0. var lab repothst reported other present at same time. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=pid epnum /repalone 'reported being alone' = MAX(repa). If (tuwhocod~=18 and tuwhocod~=19) and repalone=1 repothst=1. freq repothst. *there is no instance of such a problem. ******************************************** *compute presence of other people variables* ********************************************. *presence of animals and shop or professional staff only *possible to code from the activity data. compute alone=0. compute infant=0. compute child=0. compute sppart=0. compute clsfam=0. compute hhadult=0. compute cowork=0. compute wellknw=0. compute otherp=0. compute unknwp=0. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. freq alone to unknwp. If tuwhocod=18 or tuwhocod=19 alone=1. cro tuwhocod by alone. cro tuwhocod by u18 u5. *note that some spouses aged <18 - to avoid confusion with spouse and *a child being present from cases of a spouse aged 16-17 only present, *code the child variables only for cases where the tuwhocod>spouse/partner. If u5=1 and tuwhocod>21 infant=1. If u18=1 and tuwhocod>21 child=1. freq infant child. cro child by infant tuwhocod u18 u5. *check cases of people aged <18 present but no child code are *all diarists or spouses. temp. select if child=0 and u18=1. freq tuwhocod. if tuwhocod=20 or tuwhocod=21 sppart=1. freq sppart. *not clear whether some potential close family codes are in *the same household or not. This code is not possible to *create for 1975 (spouse), 1985 or 1992-94. The level of *close family present in 1965-66 is 30% of episodes; and *the level for the main respondent diaries in 1975/76 is *33.9%. This definition yields 40% of time around close *family - much higher - but then time around children is *higher in this survey than in the heritage surveys. *this figure will be somewhat distorted in this file *as people with multiple children around their whole *family will have a row case for each child plus the spouse *or partner for each joint activity - this figure should *amend down when matched to the activity file. if (tuwhocod>19 and tuwhocod<26) or tuwhocod=27 clsfam=1. freq clsfam. If tuwhocod=26 or (tuwhocod>27 and tuwhocod<40) hhadult=1. freq hhadult. cro hhadult by tuwhocod. If tuwhocod=55 cowork=1. freq cowork. cro cowork by tuwhocod. If (tuwhocod>19 and tuwhocod<57) wellknw=1. freq wellknw. cro tuwhocod by wellknw. If tuwhocod=57 or tuwhocod=58 otherp=1. freq otherp. cro tuwhocod by otherp. If trwhona=0 and tuwhocod<0 unknwp=1. freq unknwp. AGGREGATE /OUTFILE="C:\evrim\AHTUS\2003\tempa\addwho.sav" /BREAK=pid epnum /alone = MAX(alone) /infant = MAX(infant) /child = MAX(child) /sppart = MAX(sppart) /clsfam = MAX(clsfam) /hhadult = MAX(hhadult) /cowork = MAX(cowork) /wellknw = MAX(wellknw) /otherp = MAX(otherp) /unknwp = MAX(unknwp). ******************** *time use variables* ********************. Get file='C:\evrim\AHTUS\2003\atusact_2003.sav' /keep tucaseid tuact_n tustart tustop. sort cases by tucaseid tuact_n. SAVE TRANSLATE OUTFILE='C:\evrim\AHTUS\2003\tempa\startstop.dat' /TYPE=TAB /MAP /REPLACE /FIELDNAMES. *this start and stop time information is recorded as string *fields (in hour minute second format, though the second *field is left blank). The file is saved as ASCII and reopened *breaking up the time fields to concert the time information *to a format consistent with the other heritage files. GET DATA /TYPE = TXT /FILE = 'C:\evrim\AHTUS\2003\tempa\startstop.dat' /DELCASE = LINE /DELIMITERS = "\t:" /ARRANGEMENT = DELIMITED /FIRSTCASE = 2 /IMPORTCASE = ALL /VARIABLES = pid F14.0 epnum F2.0 sthr F2.0 stmin F2.0 stsec F2.0 finhr F2.0 finmin F2.0 finsec F2.0 . CACHE. EXECUTE. sort cases by pid(a) epnum (d). compute clockst= sthr*100 + stmin. freq clockst. *NOTE that unlike the other surveys, the 2003 ATUS *begins the diary day at 4:00 and not at midnight. *the clockst variable denotes the clock time when *the activity began - but the variables start and *end are converted to mark the minute position in *the diary for consistency with the previous surveys. Do if sthr>3. compute cst=clockst-400. Else if sthr<4. compute cst=clockst+2000. End if. Do if finhr>3. compute cend= (finhr*100 + finmin)-400. Else if finhr<4. compute cend= (finhr*100 + finmin)+2000. end if. execute. *NOTE also that the end time shows the actual *end time and not the end of the diary day. *While this information is extremely useful, *as it is not available in the heritage surveys, *the end time of the last episode is set to *2400. AGGREGATE /OUTFILE* mode=addvariables /BREAK=pid /maxep = MAX(epnum). compute lastep=0. If epnum=maxep lastep=1. freq lastep. *this confirms the recording of 20720 diaries. if lastep=1 cend=2400. desc cend cst. sort cases by pid(a) epnum(a). Compute start=trunc(cst/100)*60+(cst-(trunc(cst/100))*100). Compute end=trunc(cend/100)*60+(cend-(trunc(cend/100))*100). compute time=end-start. desc start end time. save outfile="C:\evrim\AHTUS\2003\tempa\sstime.sav" /keep pid epnum clockst start end time maxep lastep. *************************** *process the activity file* ***************************. Get file='C:\evrim\AHTUS\2003\atusact_2003.sav'. missing values all (). rename variables (tucaseid tuact_n =pid epnum). compute main=-5. compute sec=0. compute inout=-5. compute eloc=-5. compute mtrav=-5. compute survey=7. compute wave=1. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. freq survey wave. match files files=* files="C:\evrim\AHTUS\2003\tempa\sstime.sav" /BY pid epnum. execute. match files files=* table='C:\evrim\AHTUS\2003\tempa\datewght.sav' /BY pid. match files files=* files="C:\evrim\AHTUS\2003\tempa\addwho.sav" /by pid epnum. freq actcode tewhere. temp. select if tewhere=-1 or tewhere=89. freq actcode. temp. select if actcode=10101 or actcode=10102 or actcode=10201 or actcode=10401 or actcode=10499 or actcode=30112 or actcode=30503. freq actcode. *all instances of sleep (10102); sleeplessnes (10102); washing & *dressing (10201); personal care (10401); and personal care nec *(10499) have no recorded location. Recode the location of these *activities as the location of the next location unless the next *location is travelling - or if at the end of the diary, as the *previous location unless the previous location is travelling. If *the next or the previous location is commute to work, regular *travel to school, or travel to worship and the person has spent *time at home that day, the location is coded to at home. sort cases by pid(a) epnum(d). compute nextact=-5. compute nextloc=-5. if pid=lag(pid) nextact=lag(actcode). if pid=lag(pid) nextloc=lag(tewhere). freq nextact nextloc epnum. *there are 20720 diaries (we know this as the frequency *of epnum=1 is 20720) with nextloc and nextact=-5 - these *are the last episodes in the diary day. temp. select if nextact=-5. freq lastep. sort cases by pid(a) epnum(a). compute next=-5. Do if lastep=1. compute next=5. Else if nextloc=-1 or nextloc=89. compute next=1. Else if nextact>500000 and ((nextloc>0 and nextloc<12) or nextloc=30 or nextloc=31 or nextloc=32). compute next=3. Else if nextact<170000 and ((nextloc>0 and nextloc<12) or nextloc=30 or nextloc=31 or nextloc=32). compute next=4. Else if ((nextloc>11 and nextloc<30) or nextloc=99 or (nextact>16999 and nextact<500101) or nextact=500103). compute next=2. End if. val lab next 1 next still missing 2 travel next 3 next act missing but next location known 4 next act known and not travel and location known 5 end of diary and missing location. freq next. compute prevact=-5. compute prevloc=-5. if pid=lag(pid) prevact=lag(actcode). if pid=lag(pid) prevloc=lag(tewhere). freq prevact prevloc. *again 20720 cases of previous activity and location=-5. *these are the first episodes. temp. select if epnum=1. freq prevact. compute prev=-5. Do if epnum=1. compute prev=5. Else if prevloc=-1 or prevloc=89. compute prev=1. Else if prevact>500000 and ((prevloc>0 and prevloc<12) or prevloc=30 or prevloc=31 or prevloc=32). compute prev=3. Else if prevact<170000 and ((prevloc>0 and prevloc<12) or prevloc=30 or prevloc=31 or prevloc=32). compute prev=4. Else if ((prevloc>11 and prevloc<30) or prevloc=99 or (prevact>16999 and prevact<500101) or prevact=500103). compute prev=2. End if. val lab prev 1 previous still missing 2 previous travel 3 previous act missing but previous location known 4 previous act known and not travel and location known 5 start of diary and missing location. freq prev. temp. select if lastep=1 or epnum=1. freq tewhere. *most of the first and last episodes have missing location. compute where=tewhere. compute where2=tewhere. freq where. *where will be used to code location. where2 is used to look at *the transformations to ensure the adjustments work as expected. *before we start, 73713 (17.9% of cases)=-1; 2122 (0.5%) = 89. Do if pid=lag(pid) and (actcode=10101 or actcode=10102 or actcode=10201 or actcode=10299 or actcode=10401 or actcode=10499 or actcode=500106) and (prev=3 or prev=4). compute where=prevloc. Else if pid=lag(pid) and (actcode=10101 or actcode=10102 or actcode=10201 or actcode=10299 or actcode=10401 or actcode=10499 or actcode=500106) and (next=3 or next=4). compute where=nextloc. End if. freq where. cro tewhere by where. *30282 (7.3% of cases)=-1; 2122 (0.5%) = 89. Do if epnum=1. compute eptest=1. Else if epnum=2. compute eptest=2. Else if lastep=1. compute eptest=5. Else if epnum=maxep-1. compute eptest=4. Else. compute eptest=3. End if. val lab eptest 1 1st episode 2 2nd episode 3 middle episode 4 next from last episode 5 last episode. temp. select if where=-1 or where=89. freq eptest. *of those locations which remain missing 60.3% are the first episode; *8.5% 2nd episode; 14.8% last episode; 3.1% penultimate episode, rest *in middle. compute prev2=0. if where=-1 prev2=lag(where). if where=-1 and $casenum=1 prev2=-5. freq prev2. sort cases by pid(a) epnum(d). compute next2=0. if where=-1 next2=lag(where). if where=-1 and $casenum=1 next2=-5. freq next2. sort cases by pid(a) epnum(a). *second filling-in iteration - where there have been two slots in *a row with the location missing, fill in the location as the *previous or next location so long as the previous or next location *not travelling. Do if pid=lag(pid) and (where=-1 or where=89) and ((prev2>0 and prev2<12) or prev2=30 or prev2=31 or prev2=32). compute where=prev2. Else if (pid=lag(pid) or epnum=1) and (where=-1 or where=89) and ((next2>0 and next2<12) or next2=30 or next2=31 or next2=32). compute where=next2. End if. freq where. cro where by where2. *now 10373 (2.5% of cases)=-1; 2122 (0.5%) = 89. repeat the *previous iteration to pick up second and penultimate cases. compute prev2=0. if where=-1 prev2=lag(where). if where=-1 and $casenum=1 prev2=-5. freq prev2. sort cases by pid(a) epnum(d). compute next2=0. if where=-1 next2=lag(where). if where=-1 and $casenum=1 next2=-5. freq next2. sort cases by pid(a) epnum(a). Do if pid=lag(pid) and (where=-1 or where=89) and ((prev2>0 and prev2<12) or prev2=30 or prev2=31 or prev2=32). compute where=prev2. Else if (pid=lag(pid) or epnum=1) and (where=-1 or where=89) and ((next2>0 and next2<12) or next2=30 or next2=31 or next2=32). compute where=next2. End if. freq where. cro where by where2. *now 8505 (2.1% of cases)=-1; 2122 (0.5%) = 89. temp. select if where=-1 or where=89. freq eptest. *more now at beginning of diary- 34.8% first episode; 24.5% 2nd *episode; 2.8% last episode; 5.2% penult episode, rest in middle. compute test=0. if lastep=1 and where=-1 test=1. freq test. temp. select if epnum=1 and where=-1. freq next actcode nextact. *many diaries start with location unknown followed by travel *or more missing; but more are sleep followed by personal care. temp. select if epnum=2 and where=-1. cro prevact by nextact nextloc. *deal with cases of sleep or personal care, followed by personal care *in episode 2, followed by travel. Determine where people end up *after their travel cycle completed. compute mark=0. if epnum=2 and actcode=10201 and prevact<10405 and (nextact>130103 and nextact<180000) mark=1. var lab mark 'marker of sleep then wash then cycle/walk or travel'. compute mark2=0. if lastep=1 and (prevact>170000 and prevact<500000) and where=-1 and actcode<10500 mark2=1. freq mark mark2. compute locs=0. compute locf=0. if epnum=1 locs=where. if lastep=1 locf=where. AGGREGATE /OUTFILE* mode=addvariables /BREAK=pid /pattern1 'starts sleep, wash, travel' = MAX(mark) /pattern2 'ends travel then person care or sleep' = MAX(mark2) /locstart=max(locs) /locend=max(locf). cro pattern1 by locend pattern2. cro pattern2 by locstart. if pattern2=1 and lastep=1 and (where=-1 or where=89) and locstart=1 where=1. if pattern1=1 and epnum=1 and (where=-1 or where=89) and locend=1 where=1. if pattern1=1 and epnum=2 and (where=-1 or where=89) and locend=1 where=1. freq where. *now 3818 cases (0.9%) have location=-1 and 2122 (0.5%) location not remembered. *rerun some previous iterations as start and end locations now amended. sort cases by pid(a) epnum(d). compute nextloc=-5. if pid=lag(pid) nextloc=lag(where). sort cases by pid(a) epnum(a). save outfile="C:\evrim\AHTUS\2003\tempa\tempfile1.sav". compute next=-5. Do if lastep=1. compute next=5. Else if nextloc=-1 or nextloc=89. compute next=1. Else if nextact>500000 and ((nextloc>0 and nextloc<12) or nextloc=30 or nextloc=31 or nextloc=32). compute next=3. Else if nextact<170000 and ((nextloc>0 and nextloc<12) or nextloc=30 or nextloc=31 or nextloc=32). compute next=4. Else if ((nextloc>11 and nextloc<30) or nextloc=99 or (nextact>16999 and nextact<500101) or nextact=500103). compute next=2. End if. val lab next 1 next still missing 2 travel next 3 next act missing but next location known 4 next act known and not travel and location known 5 end of diary and missing location. freq next. compute prevloc=-5. if pid=lag(pid) prevloc=lag(tewhere). compute prev=-5. Do if epnum=1. compute prev=5. Else if prevloc=-1 or prevloc=89. compute prev=1. Else if prevact>500000 and ((prevloc>0 and prevloc<12) or prevloc=30 or prevloc=31 or prevloc=32). compute prev=3. Else if prevact<170000 and ((prevloc>0 and prevloc<12) or prevloc=30 or prevloc=31 or prevloc=32). compute prev=4. Else if ((prevloc>11 and prevloc<30) or prevloc=99 or (prevact>16999 and prevact<500101) or prevact=500103). compute prev=2. End if. val lab prev 1 previous still missing 2 previous travel 3 previous act missing but previous location known 4 previous act known and not travel and location known 5 start of diary and missing location. freq prev. Do if pid=lag(pid) and (actcode=10101 or actcode=10102 or actcode=10201 or actcode=10299 or actcode=10401 or actcode=10499 or actcode=500106) and (prev=3 or prev=4). compute where=prevloc. Else if pid=lag(pid) and (actcode=10101 or actcode=10102 or actcode=10201 or actcode=10299 or actcode=10401 or actcode=10499 or actcode=500106) and (next=3 or next=4). compute where=nextloc. End if. freq where. cro tewhere by where. *now 3367 cases (0.8%) have location=-1 and 2122 (0.5%) = 89. compute prev2=0. if where=-1 prev2=lag(where). if where=-1 and $casenum=1 prev2=-5. sort cases by pid(a) epnum(d). compute next2=0. if where=-1 next2=lag(where). if where=-1 and $casenum=1 next2=-5. sort cases by pid(a) epnum(a). Do if pid=lag(pid) and (where=-1 or where=89) and ((prev2>0 and prev2<12) or prev2=30 or prev2=31 or prev2=32). compute where=prev2. Else if (pid=lag(pid) or epnum=1) and (where=-1 or where=89) and ((next2>0 and next2<12) or next2=30 or next2=31 or next2=32). compute where=next2. End if. freq where. cro where by where2. *now 3171 cases (0.8%) have location=-1 and 2122 (0.5%) = 89. temp. select if where=89. freq eptest. *none of 2122 don't remember cases at the beginning and 4 at the end *of the diary, most in the middle of the diary. temp. select if where=-1. freq eptest. *first and middle episodes now have majority of location not reported during *sleep or personal care. look at sequences around both cases. temp. select if where=89. freq prevact actcode nextact prevloc nextloc. *one common pattern here is travel for child or adult care(own household & *other household), followed by drop-off or pick up adult/child, followed *by adult care or child care travel. These cases are not at home or at the *workplace, unlikely to be school as school runs are more likely to be *remembered. The AHTUS location codes are less detailed than the ATUS *codes, and the location is going to be away from home and in transit, *so these locations set to other. If where=89 and (prevact>170000 and prevact<190000) and (actcode=30111 or actcode=30112 or actcode=30503 or actcode=30504 or actcode=40111 or actcode=40112 or actcode=40507 or actcode=40508) and (nextact>170000 and nextact<190000) where=11. *also a number of 89 cases during walking - check before and after locations and acts. temp. select if where=89 and actcode=130131. cro prevloc by nextloc. *nearly half of these cases are walks returning to the same place (more home than *elsewhere), or tansition walks between home or other home and elsewhere. Code such *cases as outdoors away from home. Other cases in between forms of transport - and *walking could be inside, but are not at home or specified place, so code these as *other place. do if where=89 and actcode=130131 and ((prevloc>-1 and prevloc<12) or (nextloc>-1 and nextloc<12)). compute where=9. else if where=89 and actcode=130131. compute where=11. end if. freq where. *now 3171 cases (0.8%) have location=-1 and 108 (0.0%)=89 location not remembered. temp. select if where=89. freq prevact actcode nextact prevloc nextloc. *these remaining 89 cases all involve waiting for or dropping off an adult *or child, so set these to other location on same principle as the previous *transformation. If where=89 and (actcode=30111 or actcode=30112 or actcode=30503 or actcode=30504 or actcode=40111 or actcode=40112 or actcode=40507 or actcode=40508) where=11. temp. select if where=-1 and epnum>1 and lastep=0. cro prevloc by nextloc. *two main cases where missing location but not beginning or end of diary day, *strings of missing cases (sleep and personal care) together, and single *personal care breaks in between travel episodes. Deal with former first, *counting the number of cases in these strings. compute test=0. Do if epnum=1 and where=-1. compute test=1. Else if where=-1 and pid=lag(pid). compute test=lag(test)+1. End if. freq test. *1 string of six acts, 2 strings of 5 acts, 5 strings of 4 acts, 75 strings of *3 acts, 328 strings of two acts. Visually examine the six, five and four strings. *The 6+5+4 strings are complex days with sleep and personal activities at home. Do if (pid=20030908032544 or pid=20030201031571 or pid=20031212032380 or pid=20030302032002 or pid=20030403032588 or pid=20030504031863 or pid=20030808030931 or pid=20031212032957) and where=-1. compute where=1. End if. If where=-1 and (prevloc>-1 and prevloc<12) and (nextloc>-1 and nextloc<12) and prevloc=nextloc where=prevloc. execute. temp. select if test=3. cro epnum by locend. *most strings of three are at start of diary day and day ends at home. temp. select if where=-1 and epnum<4. cro locstart by locend. if where=-1 and epnum<4 and locend=1 where=1. freq where. *now 1811 cases (0.4%) have location=-1. temp. select if where=-1. fre prevact nextact actcode. temp. select if where=-1. desc time. compute test=0. if (actcode=10101 or actcode=10102) and where=-1 test=1. temp. select if test=1. freq epnum lastep. * (269+64) 333 of these 537 cases where sleep remains in missing location *are the first or last episode of the diary day. Visually look *at cases. compute mark=0. compute mark2=0. compute locs=0. compute locf=0. if epnum=1 locs=where. if lastep=1 locf=where. if where=1 mark=1. if where=3 mark2=3. freq mark2. AGGREGATE /OUTFILE* mode=addvariables /BREAK=pid /anyhome 'any time at own home' = MAX(mark) /anyohome 'any time at another home' = MAX(mark2) /locstart2=max(locs) /locend2=max(locf). temp. select if test=1. freq locstart2 locend2. *where the person starts or ends the day at home and *the location where they are asleep is unknown at the *other end of the diary day, code the sleep to being *at home. if test=1 and epnum=1 and locend2=1 where=1. if test=1 and lastep=1 and locstart2=1 where=1. compute test=0. if (actcode=10101 or actcode=10102) and where=-1 test=1. if test=1 and epnum=1 and locend2=3 where=3. if test=1 and lastep=1 and locstart2=3 where=3. compute test=0. if (actcode=10101 or actcode=10102) and where=-1 test=1. temp. select if test=1. cro anyhome by anyohome. temp. select if test=1. desc time. compute test2=0. if time<61 and test=1 test2=1. freq test2. *naps visually examined. *if the person spends any time at home, assume these sleep and nap *episodes are at home. If no time spent at home but time spent at *someone else's home, then the sleeping location set to other home. if anyhome=1 and test=1 where=1. if anyhome=0 and anyohome=3 and test=1 where=3. freq where. *now 1329 cases (0.3%) have location=-1. compute test=0. if (actcode=10101 or actcode=10102) and where=-1 test=1. freq test. *now only 55 cases of sleep with unidentified location. visually examine. *these diaries either clearly involve sleep at an other location *or give no clear indication. Code these as at other locations. compute atoth=0. if where=9 or where=11 atoth=1. AGGREGATE /OUTFILE* mode=addvariables /BREAK=pid /anyother 'any time at other location' = MAX(atoth) /nolocslp 'any sleep with no time at home or other home' = MAX(test). temp. select if test=1. cro anyother by nolocslp. if where=-1 and anyother=1 where=11. freq where. *now 422 cases (0.1%) have location=-1. temp. select if where=-1. fre prevact nextact actcode. temp. select if where=-1. desc time. compute test=0. if actcode=10101 and where=-1 test=1. freq test. *most of the remainder between travel gaps, remainder left missing. *this coding syntax has a hierarchy - coded as outside if possible *first, and if not possible to code as outside, then if possible *to code as in transit, and if not possible, then to code as inside. *cases with unknown location that are most likely to take place inside *sleep and personal care, and those sports that are generally inside, *USA bowling, billiards, gymnastics, martial arts, set to inside, *main activity not possible to code but location is walking set to outside; *and residual set to -8. *see what people are doing when walking (need to avoid coding mall walking *as outside). temp. select if tewhere=14. freq actcode. ******* *inout* *******. Do if where~=18 and where~=19 and (where=9 or where=17 or actcode=20401 or actcode=20402 or actcode=20499 or actcode=20501 or actcode=20502 or actcode=20599 or actcode=70102 or actcode=40502 or actcode=40105 or actcode=130102 or actcode=130104 or actcode=130106 or actcode=130108 or actcode=130110 or actcode=130112 or actcode=130113 or actcode=130114 or actcode=130116 or actcode=130118 or actcode=130121 or actcode=130123 or actcode=130124 or actcode=130126 or actcode=130127 or actcode=130129 or (where=14 and (actcode=30103 or actcode=40507 or actcode=110203 or actcode=150202 or actcode=170101 or actcode=170199 or actcode=170301 or actcode=170302 or actcode=170399 or actcode=170401 or actcode=170402 or actcode=170499 or actcode=170501 or actcode=170502 or actcode=170599 or actcode=170601 or actcode=170602 or actcode=170699 or actcode=170701 or actcode=170702 or actcode=170799 or (actcode>170800 and actcode<171800) or actcode=179999 or (actcode>170200 and actcode<170300)))). compute inout=1. Else if where<12 and actcode=150202. compute inout=2. Else if where=12 or where=13 or where=15 or where=16 or where=18 or where=19 or where=20 or where=21 or where=99 or (actcode=30103 or actcode=40507 or actcode=110203 or actcode=150202 or actcode=170101 or actcode=170199 or actcode=170301 or actcode=170302 or actcode=170399 or actcode=170401 or actcode=170402 or actcode=170499 or actcode=170501 or actcode=170502 or actcode=170599 or actcode=170601 or actcode=170602 or actcode=170699 or actcode=170701 or actcode=170702 or actcode=170799 or actcode=30112 or actcode=30503 or actcode=40112 or (actcode>170800 and actcode<171800) or actcode=179999 or (actcode>170200 and actcode<170300)). compute inout=3. Else if (where>0 and where<11) or actcode=20101 or actcode=20301 or actcode=20399 or actcode=20104 or actcode=150302 or actcode<200000 or actcode=130219 or actcode=130215 or actcode=130207 or actcode=130205 or actcode=130119 or actcode=130115 or actcode=130107 or actcode=130105. compute inout=2. Else if where=14. compute inout=1. Else. compute inout=-8. End if. freq inout. cro where by inout. temp. select if inout=1. freq actcode where. *some odd interior activity coded as outside. temp. select if (actcode=20101 or actcode=20301) and inout=1. freq where. *these 10 cases coded as location outside not at home. Leave the *inconsistency. Perhaps people are cleaning and outside gazebo. temp. select if inout=2. freq actcode where. *one case of walking inside - double check this. temp. select if inout=2 and where=14. freq actcode. *this is interior cleaning - leave the inconsistency. temp. select if inout=3. freq actcode where. *double check apparently inside locations are travel. temp. select if inout=3 and where<12. freq actcode. temp. select if inout=3 and actcode<170000. freq where. temp. select if inout=3 and actcode<170000 and where<12. freq actcode. temp. select if inout=-8. freq actcode where. ****** *eloc* ******. Do if where=1. compute eloc=1. Else if where=3. compute eloc=2. Else if where=2. compute eloc=3. Else if where=8. compute eloc=4. Else if where=6 or where=7 or where=10. compute eloc=5. Else if where=4. compute eloc=6. Else if where=5. compute eloc=7. Else if (where>11 and where<22) or where=99. compute eloc=8. Else if actcode=20501 or actcode=20599 or actcode=30203 or actcode=80402 or actcode=90101 or actcode=90102 or actcode=90103 or actcode=90104 or actcode=90199 or actcode=90201 or actcode=90202 or actcode=90299 or actcode=90401 or actcode=90402 or actcode=90499. compute eloc=1. Else if actcode=140101 or actcode=140104. compute eloc=7. Else if actcode=30202 or actcode=40202 or actcode=60101 or actcode=60103 or actcode=60104 or actcode=60199. compute eloc=4. Else if (actcode=50202 or actcode=50201 or actcode=50203 or actcode=50103 or actcode=50204) and lag(tewhere)=2. compute eloc=3. Else if (actcode=50202 or actcode=50201 or actcode=50203 or actcode=50103 or actcode=50204) and lag(tewhere)=1. compute eloc=1. Else if actcode=110202. compute eloc=6. Else if actcode=30302 or actcode=30303 or actcode=70102 or actcode=80401 or actcode=80701 or actcode=80702 or actcode=80799 or actcode=100102 or actcode=100103 or actcode=100199 or actcode=100302 or actcode=100399 or actcode=100401 or actcode=100499 or actcode=109999 or actcode=80301 or actcode=80302 or actcode=80399 or actcode=80602 or actcode=80801 or actcode=80899 or actcode=89999. compute eloc=5. Else if inout=3. compute eloc=8. Else if where=89 or where=-1. compute eloc=-8. Else. compute eloc=9. End if. *remove one odd inconsistency. If eloc=1 and where=9 eloc=9. freq eloc. cro eloc by where inout. temp. select if eloc=-8. freq actcode. ******* *mtrav* *******. Do if where=12 or where=13 or where=19. compute mtrav=1. Else if where=15 or where=16 or where=18 or where=20. compute mtrav=2. Else if where=14 or actcode=130131. compute mtrav=3. Else if where=17 or actcode=130104. compute mtrav=4. Else if where=21 or where=99 or inout=3 or eloc=8. compute mtrav=5. Else. compute mtrav=-7. End if. freq mtrav. cro mtrav by eloc where. cro mtrav by inout. *************************** *mtrav and inout checklist* ***************************. * (1) most cases of mtrav=3(on foot) should be inout=1(outside). * (2) mtrav=3(walking) should never be inout=3 (in vehicle). * (3) all mtrav=1(in car) should be inout=3(in vehicle). * (4) the vast majority of mtrav=4(other active travel) must be inout=1(outside). * (5) mtrav=5(travel by unknown means) should be inout=3(in a vehichle, almost all of it will be in a vehicle). *In this case 1, 4 and 5th conditions are satisfied. There are 13 cases of travel by *unknown means coded as inout=1(outside). temp. select if mtrav=3 and inout=3. freq actcode tuactdur. *all of them are picking up/dropping off children. temp. select if mtrav=1 and inout=1. freq actcode. *15 cases of which 3 are garden care, 1 is golfing and 11 are vehicle touring. *check the other codes. temp. select if mtrav=3 or mtrav=4. freq actcode. temp. select if mtrav=5. freq actcode. *final corrections to fix the inconsistencies. If mtrav=3 and inout=3 inout=2. If (mtrav=1 or mtrav=5) and inout=1 inout=3. cro mtrav by inout. ******* *child* *******. Do If child=0 and (actcode=30101 or actcode=30102 or actcode=30103 or actcode=30104 or actcode=30105 or actcode=30106 or actcode=30107 or actcode=30109 or actcode=30112 or actcode=30199 or actcode=30201 or actcode=30203 or actcode=30299 or actcode=30301 or actcode=30302 or actcode=30399 or actcode=40101 or actcode=40102 or actcode=40103 or actcode=40104 or actcode=40105 or actcode=40106 or actcode=40107 or actcode=40109 or actcode=40112 or actcode=40199 or actcode=40201 or actcode=40203 or actcode=40299 or actcode=40301 or actcode=40302 or actcode=40399). compute child=1. End if. freq child. ******** *animal* ********. compute animal=0. If actcode=20601 or actcode=20699 or actcode=80701 or actcode=80702 or actcode=90301 or actcode=130110 or actcode=130121 animal=1. freq animal. ********* *shoprof* *********. Compute shoprof=0. If actcode=30202 or actcode=80201 or actcode=80202 or actcode=80301 or actcode=80401 or actcode=80402 or actcode=80501 or actcode=80601 or actcode=80701 or actcode=80801 or actcode=80899 or actcode=90101 or actcode=90103 or actcode=90201 or actcode=90301 or actcode=90401 or actcode=90501 or actcode=100101 or actcode=100102 or actcode=10103 or actcode=100401 or actcode=100499 or (eloc=6 and (actcode=110101 or actcode=110199)) or actcode=110202 or actcode=120401 or actcode=120402 or actcode=120403 or actcode=120404 or actcode=120405 or actcode=130401 or actcode=130402 or actcode=130499 or (eloc>2 and (actcode=70101 or actcode=70103 or actcode=70104 or actcode=70105 or actcode=90102)) shoprof=1. freq shoprof. save outfile="C:\evrim\AHTUS\2003\tempa\tempfile2.sav". ****** *main* ******. compute main=-8. Do if actcode=500105 or actcode=10401 or actcode=10499 or actcode=10599 or actcode=19999. Compute main=1. Else if actcode=10101 or actcode=10102. Compute main=3. Else if actcode=10199. Compute main=5. Else if actcode=10201 or actcode=10299. Compute main=6. Else if actcode=10301 or actcode=10399 or actcode=10501. Compute main=7. Else if actcode=50202. Compute main=8. Else if actcode=110201 or actcode=110203 or actcode=110204 or actcode=119999 or (eloc~=6 and (actcode=110101 or actcode=110199 or actcode=110299)). Compute main=9. Else if tewhere~=1 and (actcode=50101 or actcode=50199 or actcode=50299 or actcode=59999). Compute main=10. Else if tewhere=1 and (actcode=50101 or actcode=50199 or actcode=50299 or actcode=59999). Compute main=11. Else if actcode=50102 or actcode=50301 or actcode=50302 or actcode=50303 or actcode=50304 or actcode=50399. Compute main=12. Else if actcode=50201 or actcode=50203. Compute main=13. Else if actcode=50103 or actcode=50204. Compute main=14. Else if (actcode>50400 and actcode<50406) or actcode=50499. Compute main=15. Else if actcode=60101 or actcode=60103 or actcode=60104 or actcode=60199. Compute main=16. Else if actcode=60301 or actcode=60302 or actcode=60303 or actcode=60399. Compute main=17. Else if actcode=60102 or actcode=60299. Compute main=18. Else if actcode=60201 or actcode=60202 or actcode=60203 or actcode=60401 or actcode=60402 or actcode=60403 or actcode=60499 or actcode=69999 or actcode=160103. Compute main=19. Else if actcode=20201 or actcode=20202. Compute main=20. Else if actcode=20203 or actcode=20299. Compute main=21. Else if actcode=20101 or actcode=20301 or actcode=20399 or actcode=20401. Compute main=22. Else if actcode=20102 or actcode=20103. Compute main=23. Else if actcode=20302 or actcode=20303 or actcode=20402 or actcode=20499 or actcode=20502 or actcode=20701 or actcode=20799 or actcode=20801 or actcode=20899. Compute main=24. Else if actcode=20104 or actcode=20199 or actcode=20901 or actcode=20902 or actcode=20905 or actcode=20999 or actcode=29999. Compute main=25. Else if actcode=70101 or actcode=70103 or actcode=70104 or actcode=70105 or actcode=90102. Compute main=26. Else if actcode=70102 or actcode=70199 or actcode=70201 or actcode=70299 or actcode=70301 or actcode=70399 or actcode=79999 or actcode=160104. Compute main=27. Else if actcode=80501 or actcode=80502 or actcode=80599 or actcode=160105. Compute main=28. Else if actcode=80401 or actcode=80402 or actcode=80403 or actcode=80499 or actcode=80701 or actcode=80702 or actcode=80799. Compute main=29. Else if actcode=90101 or actcode=90103 or actcode=90104 or actcode=90199 or actcode=90201 or actcode=90202 or actcode=90299 or actcode=90301 or actcode=90302 or actcode=90399 or actcode=90401 or actcode=90402 or actcode=90499 or actcode=90501 or actcode=90502 or actcode=90599 or actcode=99999 or actcode=160106. Compute main=30. Else if actcode=80201 or actcode=80202 or actcode=80203 or actcode=80299 or actcode=100101 or actcode=100102 or actcode=100103 or actcode=100199 or actcode=100301 or actcode=100302 or actcode=100399 or actcode=100401 or actcode=100499 or actcode=109999 or actcode=160108. Compute main=31. Else if actcode=80301 or actcode=80302 or actcode=80399 or actcode=80601 or actcode=80602 or actcode=80801 or actcode=80899 or actcode=89999. Compute main=32. Else if (infant=1) and (actcode=30101 or actcode=30108 or actcode=30109 or actcode=30199 or actcode=80101 or actcode=80102 or actcode=80199 or actcode=160107). Compute main=33. Else if (child=1 and (actcode=30101 or actcode=30108 or actcode=30109 or actcode=30199 or actcode=80199)) or actcode=80101 or actcode=80102 or actcode=160107. Compute main=34. Else if actcode=30108. compute main=34. Else if actcode=30301 or actcode=30302 or actcode=30303 or actcode=30399. Compute main=35. Else if actcode=30103. Compute main=36. Else if actcode=30104 or actcode=30107 or actcode=30201 or actcode=30202 or actcode=30203 or actcode=30204 or actcode=30299. Compute main=37. Else if actcode=30102 or actcode=30106. Compute main=38. Else if actcode=30110 or actcode=30111 or actcode=30112 or actcode=39999. Compute main=39. Else if (actcode>30400 and actcode<30406) or actcode=30499 or (actcode>30500 and actcode<30505) or actcode=30599 or (actcode>40100 and actcode<40105) or (actcode>40105 and actcode<40113) or actcode=40199 or (actcode>40200 and actcode<40205) or actcode=40299 or (actcode>40300 and actcode<40304) or actcode=40399 or (actcode>40400 and actcode<40406) or actcode=40499 or (actcode>40500 and actcode<40509) or actcode=40599 or actcode=49999. Compute main=40. Else if (actcode>150100 and actcode<150107) or actcode=150199 or (actcode>150200 and actcode<150205) or actcode=150299 or actcode=150301 or actcode=150302 or actcode=150399 or actcode=150401 or actcode=150402 or actcode=150499 or actcode=150501 or actcode=150599 or actcode=150601 or actcode=150602 or actcode=150699 or actcode=159999. Compute main=41. Else if actcode=100201 or actcode=100299 or actcode=100303. Compute main=42. Else if (actcode>140100 and actcode<140105) or actcode=149999. Compute main=49. Else if actcode=120405 or actcode=120499 or actcode=120504. Compute main=50. Else if (actcode>130200 and actcode<130300) or actcode=130302 or actcode=130399 or actcode=130402 or actcode=130499. Compute main=51. Else if actcode=120403. Compute main=52. Else if actcode=120401. Compute main=53. Else if actcode=120402. Compute main=54. Else if actcode=110202 or actcode=110101 or actcode=110199 or actcode=120404 or actcode=110299. Compute main=56. Else if actcode=120201 or actcode=120202 or actcode=120299. Compute main=57. Else if (actcode>130100 and actcode<130104) or actcode=130105 or actcode=130107 or (actcode>130108 and actcode<130112) or (actcode>130112 and actcode<130116) or actcode=130117 or (actcode>130118 and actcode<130131) or (actcode>130131 and actcode<130200) or actcode=130301 or actcode=130401 or actcode=139999. Compute main=60. Else if actcode=130131 or (actcode>500000 and tewhere=14). Compute main=62. Else if actcode=130104. Compute main=63. Else if actcode=130108. Compute main=64. Else if actcode=30105 or actcode=40105. Compute main=65. Else if actcode=130106 or actcode=130112 or actcode=130116 or actcode=130118. Compute main=66. Else if actcode=20501 or actcode=20599. Compute main=67. Else if actcode=20601 or actcode=20699. Compute main=68. Else if actcode=120101 or actcode=120199. Compute main=72. Else if actcode=120307 or actcode=129999. Compute main=73. Else if actcode=120313. Compute main=75. Else if actcode=120309. Compute main=76. Else if actcode=120310 or actcode=120311. Compute main=77. Else if actcode=120301 or actcode=120302 or actcode=120399 or actcode=120501 or actcode=120502 or actcode=120503 or actcode=120599. Compute main=78. Else if actcode=120312. Compute main=81. Else if actcode=120306. Compute main=84. Else if actcode=120305. Compute main=85. Else if actcode=120303 or actcode=120304. Compute main=86. Else if actcode=20903. Compute main=87. Else if actcode=160101 or actcode=160102 or actcode=169999. Compute main=88. Else if actcode=20904 or actcode=120308. Compute main=89. Else if actcode=500103. Compute main=90. Else if actcode=170101 or actcode=170199 or (actcode>171100 and actcode< 171200) or actcode=170302 or actcode=170401 or actcode=170402 or actcode=170499. Compute main=91. Else if actcode=170502. Compute main=92. Else if actcode=170501 or actcode=170599. Compute main=93. Else if actcode=170601 or actcode=170602 or actcode=170699. Compute main=94. Else if (actcode>170200 and actcode<170300) or actcode=170701 or actcode=170702 or actcode=170799 or (actcode>170800 and actcode<170900) or (actcode>170900 and actcode<171000) or (actcode>171000 and actcode<171100). Compute main=95. Else if actcode=170301 or actcode=170399. Compute main=96. Else if (actcode>171400 and actcode<171500) or (actcode>171500 and actcode<171600). Compute main=97. Else if actcode=179999 or (actcode>171200 and actcode<171400) or (actcode>171600 and actcode<171800). Compute main=98. Else if actcode=500101 or actcode=500102 or actcode=500104 or actcode=500106 or actcode=500107 or actcode=509999. end if. freq main. temp. select if main=-8. freq actcode. temp. select if main<15. cro actcode by main. temp. select if main>14 and main<20. cro actcode by main. temp. select if main>19 and main<28. cro actcode by main. temp. select if main>27 and main<35. cro actcode by main. temp. select if main>34 and main<42. cro actcode by main. temp. select if main>41 and main<56. cro actcode by main. temp. select if main>55 and main<62. cro actcode by main. temp. select if main>61 and main<70. cro actcode by main. temp. select if main>69 and main<76. cro actcode by main. temp. select if main>75 and main<84. cro actcode by main. temp. select if main>83 and main<91. cro actcode by main. temp. select if main>90. cro actcode by main. vector dqcheck(3). Loop i=1 to 3. compute dqcheck(i)=0. end loop. var lab dqcheck1 "miss main, mode of transport". var lab dqcheck2 "miss main, 2nd act reported". var lab dqcheck3 "miss 20 min before/after travel". val lab dqcheck1 to dqcheck3 0 ordinary diary 1 includes pattern. freq dqcheck1 to dqcheck3. temp. select if main=-8. freq eloc. Do If main=-8 and eloc=8. compute main=90. compute dqcheck1=1. End if. freq trtcc_ln trtcocln. *data file examined visually. These variables mirror *the duration of the activity when the activity entailed *secondary child care, and otherwise are coded as -1. If trtcc_ln>0 or trtcocln>0 sec=34. If main<90 and eloc=8 sec=90. freq sec. *If the main activity is missing and the location is *valid and not at home or another home and the *previous location is valid, not travelling, and *different from the present location, the main *activity is coded to impute travel * *if the main activity is valid and not travel and *both the current and previous locations are valid *and the previous location is not travelling and the *current and previous location differ, the secondary *activity is coded as imputed travel * *if the main activity is missing and the location is *at home or another home and the previous location is *travel, main activity is coded as unknown personal *or household care * *if the main activity is missing and the previous location *is travel and the present location is valid but not at *a home, the main activity is coded as imputed out of *home activity. Do if pid=lag(pid). Do if main<0 and ((eloc=1 or eloc=2) and lag(eloc)=8). compute main=2. compute dqcheck3=1. Else if main<0 and ((eloc>2 and eloc<8) or eloc=9) and lag(eloc)=8. compute main=58. Else if main<0 and ((eloc>0 and eloc~=8 and lag(eloc)>0 and lag(eloc)~=8) and eloc~=lag(eloc)). compute main=90. compute dqcheck1=1. Else if (main>0 and main<90) and sec=0 and ( ((eloc>1 and eloc<6) or eloc=7) and ((lag(eloc)>1 and lag(eloc)<6) or lag(eloc)=7)) and eloc~=lag(eloc). compute sec=90. End if. End if. freq sec. temp. select if main=-8 or main=2 or main=58 or main=90. freq main. *if main activity still missing and the location is *valid and not at home, code the main activity as *imputed activity away from home. If main<0 and eloc>2 main=58. temp. select if main=-8 or main=58. freq main. temp. select if main=-8. freq actcode. *228 of the missing activities are coded as unrecorded as *simultaneous activities recorded. investigate where these. temp. select if main=-8 and actcode=500104. freq eloc sec clockst alone child sppart hhadult. *all such cases take place at home or another person's home; *78 (1/3 of cases) overlap a child being in the person's care; *cases spread throughout the day. *check two of the three bad diary tests for these cases, *calculating missing time as not including this simultaneous *activity code. compute misstest=0. if main=-8 and actcode~=500104 misstest=time. AGGREGATE /OUTFILE* mode=addvariables /BREAK=pid /summiss=sum(misstest) /totep=NU(epnum). temp. select if main=-8 and actcode=500104. freq totep summiss. *these diaries have 8 or more activities, and once this category *is excluded from the missing codes, all but three of these diaries *have no or an acceptable amount of missing time. Recode this activity *as imputed personal or household care. if main=-8 and actcode=500104 main=2. *now see if any of these cases happen at the end of the diary day. compute lastep=0. If epnum=maxep lastep=1. freq lastep. compute test=0. if lastep=1 and main=-8 and lag(main)>0 test=1. temp. select if test=1. freq time eloc actcode. *there are 12 such cases, all at home. compute test2=0. if test=1 test2=lag(main). freq test2. *7 cases asleep prior to activity, 1 each of at party, eat, *visit friends, read, on computer. temp. select if test=1 and eloc=1. freq test2. *5 of the sleeping cases, the eat, party and computing cases at home; *2 sleep, the read and the receive friends at home or visit friends *at their home cases with unknown location, rest these cases to sleep. If test=1 main=4. temp. select if main=-8 or main=2 or main=4 or main=58. freq main. *now look at cases where the first activity is missing. compute test=0. If epnum=1 and main=-8 test=1. freq test. temp. select if test=1. freq time eloc. *11 such cases, all at home. compute test2=0. if lag(test)=1 test2=main. freq test2. cro test2 by eloc. *all 11 cases at home. if test=1 and test2<63 main=4. if test2=-8 or (test=1 and test2>60) main=2. temp. select if main=-8 or main=2 or main=4 or main=58. freq main. *look at cases that remain missing that happen after sleep. compute test=0. if pid=lag(pid) and main=-8 and (lag(main)=3 or lag(main)=4) test=1. temp. select if test=1. freq eloc time. *117 such cases, 116 at home, 1 at unknown locations; these gaps are recoded *as imputed personal or household care. If test=1 main=2. temp. select if main=-8 or main=2. freq main. compute test=0. if main=-8 and (lag(main)=9 or lag(main)=20 or lag(main)=21) test=1. temp. select if test=1. freq time eloc. *346 cases where the time gap in a diary follows eating *or food preparation of setting table/putting away *dishes; of these 336 at home and 10 at another's home. *61.8% an hour or less, though some gaps very long. Set *gaps of an hour or less to imputed personal or household care. If test=1 and (eloc=1 or eloc=2) and time<61 main=2. temp. select if main=-8 or main=2. freq main. temp. select if actcode>500000. freq main. *at this point, 1271 of the 3293 cases coded with missing codes *in the original data are still coded as missing - 75 now general *personal care; 811 imputed personal or household care, 23 imputed *sleep; 452 imputed time away from home; 54 walking; 607 imputed *travel. temp. select if main=-8. freq time eloc. *remaining gaps range from 1 minute to 13 hours 25 minutes. 2/3rds *are an hour or less. No further effort made to fill in gaps using *other diary information. If (main>89 or sec>89) and mtrav=-7 mtrav=5. freq mtrav. *impute eating where no main activity eating but *main activity food preparation or setting table reported. compute eatdr=0. If main=8 or main=9 or main=56 eatdr=time. *check for missing eating time but recorded set table or food prep. AGGREGATE /OUTFILE=* mode=addvariables /BREAK=pid /anyeat = SUM(eatdr). freq anyeat. *at the moment, 6.4% no eating. temp. select if anyeat=0. freq maxep main. *some really low episode diaries with missing eating. *are some diaries with food preparation activities *but no eating. Do if anyeat=0 and (main=20 or main=21) and sec=0 and maxep>9. compute sec=2. End if. freq sec. save outfile='C:\evrim\AHTUS\2003\USA2003hfep.SAV' /KEEP survey wave pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp tu06fwgt. AGGREGATE /OUTFILE='C:\evrim\AHTUS\2003\tempa\USA2003marker.SAV' /BREAK=survey wave pid /dqcheck1=MAX(dqcheck1) /dqcheck2=MAX(dqcheck2) /dqcheck3=MAX(dqcheck3). *extract the state information to construct a separate weight *excluding those states not found in all studies in the AHTUS. get file='C:\evrim\AHTUS\2003\atuscps_2003.sav' /keep tucaseid tulineno gestfips. SORT CASES BY tucaseid (A) tulineno (A). *note that the fromresp.sav file is created in the syntax *that generates the background variable file for the ATUS. MATCH FILES /FILE=* /FILE='C:\evrim\AHTUS\2003\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 and other cases need to be eliminated. sel if inresp=1. execute. 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. compute exclude=0. if any (state,2,8,12,13,17,27,29,30,32,35,40,46,51) exclude=1. var lab exclude states to exclude in xtimewt. val lab exclude 0 states in all samples 1 states only in most recent samples. cro exclude by state. rename variables (tucaseid = pid). sort cases by pid. save outfile='C:\evrim\AHTUS\2003\tempa\excludestates.sav' /keep pid exclude. Get file='C:\evrim\AHTUS\2003\USA2003hfep.SAV'. freq main. *0.3% of main activity time missing in this file. sort cases by survey pid. Compute t0pcare=0. Compute t1paidw=0. Compute t2ed=0. compute t3unpaid=0. compute t4acvol=0. compute t5outhm=0. compute t6exerc=0. compute t7inhm=0. compute t8media=0. compute t9trav=0. compute tmiss=0. vector tmain(98) tsc(98). compute outside=0. compute inveh=0. compute inside=0. compute locunk=0. compute athome=0. compute atwrksc=0. compute elsewhr=0. compute lunk=0. compute walone=0. compute wchild=0. compute wsppart=0. compute wclsfam=0. compute wother=0. compute withunk=0. If main>-1 and main<10 t0pcare =time. If main>9 and main<16 t1paidw =time. If main>15 and main<20 t2ed =time. If main>19 and main<40 t3unpaid =time. If main>39 and main<50 t4acvol =time. If main>49 and main<60 t5outhm =time. If main>59 and main<70 t6exerc =time. If main>69 and main<80 t7inhm =time. If main>79 and main<90 t8media =time. If main>89 and main<100 t9trav =time. If main=-8 tmiss =time. If inout=1 outside =time. if inout=2 inside =time. if inout=3 inveh =time. if inout=-8 locunk =time. if eloc=1 athome =time. if eloc=3 or eloc=4 atwrksc =time. if eloc=2 or eloc>4 elsewhr =time. If eloc=-8 lunk =time. If alone=1 walone =time. If child=1 wchild =time. If sppart=1 wsppart =time. If clsfam=1 wclsfam =time. If otherp=1 or cowork=1 or shoprof=1 or hhadult=1 or (clsfam=0 and wellknw=1) wother=time. If unknwp=1 withunk =time. Do repeat a=tmain1 to tmain98 /b=tsc1 to tsc98 /i=1 to 98. compute a=0. compute b=0. If main=i a=time. If main=i and (sec>32 and sec<40) b=time. End repeat. apply dictionary from 'C:\evrim\AHTUS\schema2.sav'. desc t0pcare t1paidw t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav outside inside inveh locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk. *compute a test variable to ensure the 1 and 2 digits *sets of time use codes add up to 1440. both cases need *to include missing time in the sum. compute t1dig = SUM (t0pcare to tmiss). compute t2dig = SUM (tmiss to tmain98). execute. *set all variable codes which could not be constructed *to -9 for missing. desc tmain1 to tmain98. *the variables that have no labels *(tmain47, tmain59, tmain61, tmain69, tmain79 and tmain80) * do not exist as AHTUS codes. *variables with labels but no recorded time will be coded as -9. recode tmain5 tsc5 tmain43 tsc43 tmain44 tsc44 tmain45 tsc45 tmain46 tsc46 tmain48 tsc48 tmain55 tsc55 tmain64 tsc64 tmain70 tsc70 tmain71 tsc71 tmain74 tsc74 tmain82 tsc82 tmain83 tsc83 (0=-9). execute. AGGREGATE /OUTFILE='C:\evrim\AHTUS\2003\USA2003hfsum.sav' /BREAK=survey wave pid /diaryday = MAX(diaryday) /cday = MAX(cday) /month = MAX(month) /year = MAX(year) /tottime "total minutes recorded in diary" = SUM(time) /numep 'total original episodes recorded' = MAX(epnum) /t0pcare = SUM(t0pcare) /t1paid = SUM(t1paidw) /t2ed = SUM(t2ed) /t3unpaid = SUM(t3unpaid) /t4acvol = SUM(t4acvol) /t5outhm = SUM(t5outhm) /t6exerc = SUM(t6exerc) /t7inhm = SUM(t7inhm) /t8media = SUM(t8media) /t9trav = SUM(t9trav) /tmiss = SUM(tmiss) /tmain1 = SUM(tmain1) /tmain2 = SUM(tmain2) /tmain3 = SUM(tmain3) /tmain4 = SUM(tmain4) /tmain5 = MAX(tmain5) /tmain6 = SUM(tmain6) /tmain7 = SUM(tmain7) /tmain8 = SUM(tmain8) /tmain9 = SUM(tmain9) /tmain10 = SUM(tmain10) /tmain11 = SUM(tmain11) /tmain12 = SUM(tmain12) /tmain13 = SUM(tmain13) /tmain14 = SUM(tmain14) /tmain15 = SUM(tmain15) /tmain16 = SUM(tmain16) /tmain17 = SUM(tmain17) /tmain18 = SUM(tmain18) /tmain19 = SUM(tmain19) /tmain20 = SUM(tmain20) /tmain21 = SUM(tmain21) /tmain22 = SUM(tmain22) /tmain23 = SUM(tmain23) /tmain24 = SUM(tmain24) /tmain25 = SUM(tmain25) /tmain26 = SUM(tmain26) /tmain27 = SUM(tmain27) /tmain28 = SUM(tmain28) /tmain29 = SUM(tmain29) /tmain30 = SUM(tmain30) /tmain31 = SUM(tmain31) /tmain32 = SUM(tmain32) /tmain33 = SUM(tmain33) /tmain34 = SUM(tmain34) /tmain35 = SUM(tmain35) /tmain36 = SUM(tmain36) /tmain37 = SUM(tmain37) /tmain38 = SUM(tmain38) /tmain39 = SUM(tmain39) /tmain40 = SUM(tmain40) /tmain41 = SUM(tmain41) /tmain42 = SUM(tmain42) /tmain43 = MAX(tmain43) /tmain44 = MAX(tmain44) /tmain45 = MAX(tmain45) /tmain46 = MAX(tmain46) /tmain48 = MAX(tmain48) /tmain49 = SUM(tmain49) /tmain50 = SUM(tmain50) /tmain51 = SUM(tmain51) /tmain52 = SUM(tmain52) /tmain53 = SUM(tmain53) /tmain54 = SUM(tmain54) /tmain55 = MAX(tmain55) /tmain56 = SUM(tmain56) /tmain57 = SUM(tmain57) /tmain58 = SUM(tmain58) /tmain60 = SUM(tmain60) /tmain62 = SUM(tmain62) /tmain63 = SUM(tmain63) /tmain64 = MAX(tmain64) /tmain65 = SUM(tmain65) /tmain66 = SUM(tmain66) /tmain67 = SUM(tmain67) /tmain68 = SUM(tmain68) /tmain70 = MAX(tmain70) /tmain71 = MAX(tmain71) /tmain72 = SUM(tmain72) /tmain73 = SUM(tmain73) /tmain74 = MAX(tmain74) /tmain75 = SUM(tmain75) /tmain76 = SUM(tmain76) /tmain77 = SUM(tmain77) /tmain78 = SUM(tmain78) /tmain81 = SUM(tmain81) /tmain82 = MAX(tmain82) /tmain83 = MAX(tmain83) /tmain84 = SUM(tmain84) /tmain85 = SUM(tmain85) /tmain86 = SUM(tmain86) /tmain87 = SUM(tmain87) /tmain88 = SUM(tmain88) /tmain89 = SUM(tmain89) /tmain90 = SUM(tmain90) /tmain91 = SUM(tmain91) /tmain92 = SUM(tmain92) /tmain93 = SUM(tmain93) /tmain94 = SUM(tmain94) /tmain95 = SUM(tmain95) /tmain96 = SUM(tmain96) /tmain97 = SUM(tmain97) /tmain98 = SUM(tmain98) /tsc1 = SUM(tsc1) /tsc2 = SUM(tsc2) /tsc3 = SUM(tsc3) /tsc4 = SUM(tsc4) /tsc5 = MAX(tsc5) /tsc6 = SUM(tsc6) /tsc7 = SUM(tsc7) /tsc8 = SUM(tsc8) /tsc9 = SUM(tsc9) /tsc10= SUM(tsc10) /tsc11= SUM(tsc11) /tsc12= SUM(tsc12) /tsc13= SUM(tsc13) /tsc14= SUM(tsc14) /tsc15= SUM(tsc15) /tsc16= SUM(tsc16) /tsc17= SUM(tsc17) /tsc18= SUM(tsc18) /tsc19= SUM(tsc19) /tsc20= SUM(tsc20) /tsc21= SUM(tsc21) /tsc22= SUM(tsc22) /tsc23= SUM(tsc23) /tsc24= SUM(tsc24) /tsc25= SUM(tsc25) /tsc26= SUM(tsc26) /tsc27= SUM(tsc27) /tsc28= SUM(tsc28) /tsc29= SUM(tsc29) /tsc30= SUM(tsc30) /tsc31= SUM(tsc31) /tsc32= SUM(tsc32) /tsc33= SUM(tsc33) /tsc34= SUM(tsc34) /tsc35= SUM(tsc35) /tsc36= SUM(tsc36) /tsc37= SUM(tsc37) /tsc38= SUM(tsc38) /tsc39= SUM(tsc39) /tsc40= SUM(tsc40) /tsc41= SUM(tsc41) /tsc42= SUM(tsc42) /tsc43= MAX(tsc43) /tsc44= MAX(tsc44) /tsc45= MAX(tsc45) /tsc46= MAX(tsc46) /tsc48= MAX(tsc48) /tsc49= SUM(tsc49) /tsc50= SUM(tsc50) /tsc51= SUM(tsc51) /tsc52= SUM(tsc52) /tsc53= SUM(tsc53) /tsc54= SUM(tsc54) /tsc55= MAX(tsc55) /tsc56= SUM(tsc56) /tsc57= SUM(tsc57) /tsc58= SUM(tsc58) /tsc60= SUM(tsc60) /tsc62= SUM(tsc62) /tsc63= SUM(tsc63) /tsc64= MAX(tsc64) /tsc65= SUM(tsc65) /tsc66= SUM(tsc66) /tsc67= SUM(tsc67) /tsc68= SUM(tsc68) /tsc70= MAX(tsc70) /tsc71= MAX(tsc71) /tsc72= SUM(tsc72) /tsc73= SUM(tsc73) /tsc74= MAX(tsc74) /tsc75= SUM(tsc75) /tsc76= SUM(tsc76) /tsc77= SUM(tsc77) /tsc78= SUM(tsc78) /tsc81= SUM(tsc81) /tsc82= MAX(tsc82) /tsc83= MAX(tsc83) /tsc84= SUM(tsc84) /tsc85= SUM(tsc85) /tsc86= SUM(tsc86) /tsc87= SUM(tsc87) /tsc88= SUM(tsc88) /tsc89= SUM(tsc89) /tsc90= SUM(tsc90) /tsc91= SUM(tsc91) /tsc92= SUM(tsc92) /tsc93= SUM(tsc93) /tsc94= SUM(tsc94) /tsc95= SUM(tsc95) /tsc96= SUM(tsc96) /tsc97= SUM(tsc97) /tsc98= SUM(tsc98) /outside= SUM(outside) /inside=SUM(inside) /inveh= SUM(inveh) /locunk = SUM(locunk) /athome=SUM(athome) /atwrksc=SUM(atwrksc) /elsewhr= SUM(elsewhr) /lunk = SUM(lunk) /walone = SUM(walone) /wchild = SUM(wchild) /wsppart=SUM(wsppart) /wclsfam= SUM(wclsfam) /wother = SUM(wother) /withunk=SUM(withunk) /t1dig = SUM(t1dig) /t2dig = SUM(t2dig) /tu06fwgt=MAX(tu06fwgt) . ****** *HHID* ******. *extract hhid. in this file, there is a variable called *occurnum labelled unique person identifier which is *not used as only in this file; also there is an *alternative household identifier - qstnum - which *also is not used. The ATUS User Guide identifies *hrhhid as the household id which links back to the *other waves of the CPS data. GET FILE='C:\evrim\AHTUS\2003\atuscps_2003.sav' /keep tucaseid hrhhid huinttyp. sort cases by tucaseid. freq huinttyp. MATCH FILES /file=* /table='C:\evrim\AHTUS\2003\tempa\fromresp.sav'/in=inresp /BY tucaseid. freq inresp. *this selection leaves only lines per CPS interview in households *of respondents who completed diaries, though there will be a line *for each CPS participant where there was more than one in the household. *this step gets rid of the non-time diary element participants. sel if inresp=1. execute. rename variables (tucaseid = pid). sort cases by pid. *at the aggregate statement, the number of cases is *dropped to the number of diarists. AGGREGATE outfile='C:\evrim\AHTUS\2003\tempa\hhid.sav' /BREAK=pid /hhid = MAX(hrhhid). GET FILE='C:\evrim\AHTUS\2003\atusresp_2003.sav' /keep tucaseid trhhchld. rename variables tucaseid=pid. save outfile='C:\evrim\AHTUS\2003\tempa\d.sav'. Get file='C:\evrim\AHTUS\2003\USA2003hfsum.sav'. *check that variables sum to 1440 in aggregated file. formats t0pcare to t2dig (f8.0). execute. freq t1dig t2dig tottime. *all diaries add up to the correct 1440 minutes for *both the 1 and 2 digit levels of activity code. match files files=* files='C:\evrim\AHTUS\2003\tempa\dem.sav' files='C:\evrim\AHTUS\2003\tempa\hhid.sav' files='C:\evrim\AHTUS\2003\tempa\d.sav' /by pid. execute. sort cases by hhid pid. save outfile='C:\evrim\AHTUS\2003\tempa\weights.sav'. ********* *badcase* *********. Get file='C:\evrim\AHTUS\2003\USA2003hfep.SAV'. freq main. match files files=* table='C:\evrim\AHTUS\2003\tempa\hhid.sav' /by pid. execute. sort cases by hhid pid. **compute misbasic variable**. compute tmiss2=0. compute aeatdr=0. compute asleep=0. compute apcare=0. compute atrav=0. compute anycare=0. execute. If main=-8 tmiss2=time. desc tmiss2. *include the diaries with food preparation activities *but no eating. If main=8 or main=9 or main=20 or main=21 or main=56 or sec=2 or sec=8 or sec=9 or sec=20 or sec=21 or sec=56 or eloc=6 aeatdr=1. *includes do nothing, think, time out or work break. If main=3 or main=4 or main=5 or main=13 or main=78 or sec=3 or sec=4 or sec=5 or sec=13 or sec=78 asleep=1. *includes purchase of per'l care and imputed p'l or hhold care. If main=1 or main=2 or main=6 or main=7 or main=28 or sec=1 or sec=6 or sec=7 or sec=28 apcare=1. *includes sports/exercise, walking, cycling, outdoor recreation, *gardening, petcare, hunting. If (main>89 and main<99) or main=60 or main=62 or main=63 or main=64 or main=65 or main=66 or main=67 or main=68 or (sec>89 and sec<99) or sec=60 or sec=62 or sec=63 or sec=64 or sec=65 or sec=66 or sec=67 or sec=68 atrav=1. *to create carer flag. If (main>32 and main<41) or (sec>32 and sec<41) anycare=1. execute. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=survey wave hhid pid /eatdr=MAX(aeatdr) /sleep=MAX(asleep) /pcare=MAX(apcare) /trav=MAX(atrav). freq eatdr sleep pcare trav. *compute test variable to figure the diarists who stayed at home all day. compute test=0. if eloc~=lag(eloc) and (hhid=lag(hhid) and pid=lag(pid)) and trav=0 test=1. freq test. compute test2=0. if (hhid=lag(hhid) and pid=lag(pid)) and lag(asleep)=1 and (atrav=1 or (main>9 and main<70) or main>89) and pcare=0 test2=1. freq test2. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=survey wave hhid pid /pcarex=MAX(test2) /travx=MAX(test). if pcare=0 and pcarex=1 pcare=1. if trav=0 and travx=1 trav=1. freq eatdr sleep pcare trav. compute test=0. if eloc=1 or eloc=2 test=time. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=survey wave hhid pid /athome=SUM(test) /maxep=MAX(epnum). desc athome maxep. *Diaries including only 2 of the basic act but have at least *12 episodes where the diarist reports being at home all day *but otherwise meet the other 4 good diary criteria count as *good diaries. if trav=0 and maxep>11 and athome>1000 trav=1. freq trav. AGGREGATE /OUTFILE=* /BREAK=survey wave hhid pid /eatdr=SUM(eatdr) /sleep=SUM(sleep) /pcare=SUM(pcare) /tmiss2=SUM(tmiss2) /trav=SUM(trav) /anycare=MAX(anycare) /epnum=MAX(epnum) /day=MAX(diaryday). compute misbasic=0. execute. If trav=0 misbasic=misbasic+1. If sleep=0 misbasic=misbasic+1. If pcare=0 misbasic=misbasic+1. If eatdr=0 misbasic=misbasic+1. execute. var lab misbasic number basic activites not recorded. freq misbasic. cro anycare by misbasic. *diaries of carers who otherwise meet the 4 good diary criteria count as good diaries. if (epnum>7 or anycare=1) and misbasic=2 misbasic=1. freq misbasic. temp. select if misbasic>1. freq epnum tmiss2. *we need sex and age information. sort cases by hhid pid. match files files= * file="C:\evrim\AHTUS\2003\usa03sexage_all.sav" file='C:\evrim\AHTUS\2003\tempa\weights.sav' /by hhid pid. execute. compute lowqual=0. execute. if tmiss2>90 or epnum<7 or misbasic>1 lowqual=1. freq lowqual. *697 - 3.4% bad diaries.-20023 good ones. recode tmiss2 (0 thru 90=0) (91 thru hi=1). recode epnum (0 thru 6=1) (7 thru hi=0) into nep. recode misbasic (0,1=0) (2,3,4=1). execute. freq tmiss2 nep misbasic age sex. *As no sex or age missing, only the diary quality variables *determine bad case in this case. cro tmiss2 by nep by misbasic. * 697 (6.4%) bad diaries. * 1 diary low quality on all 3 counts. *110 bad on 2 counts. * 1 low episode & missing 91+ min; * 0 missing basic acts & 91+ min; * 109 missing basic acts and low episode. * 586 bad on 1 count. * 183 have only 5/6 episodes; * 351 missing 91+ minutes only; * 52 missing 2+ basic acts only. ********** *caremflg* **********. compute caremflg=0. if anycare=1 and misbasic>1 and epnum>6 caremflg=1. cro caremflg by anycare by misbasic. ********* *weights* *********. weight by tu06fwgt. freq diaryday. weight off. *tu06fwgt corrects for survey and day of the week. compute childm=0. If age<18 childm=1. freq childm. means age by childm /cells= min max. compute origwght = tu06fwgt. compute owghtflg = 3. compute xtimewt=0. compute infltwt=0. compute recwght=0. apply dictionary from 'C:\evrim\AHTUS\schema2.sav'. compute baddem=0. if sex<1 or age<15 baddem=1. freq lowqual baddem. recode age (15 thru 17=0)(18 thru 24=1)(25 thru 34=2) (35 thru 44=3)(45 thru 54=4)(55 thru 64=5) (65 thru 74=6)(75 thru high=7)(else=8) into agegp. recode age (15 thru 17=0)(18 thru 24=1)(25 thru 34=2) (35 thru 44=3)(45 thru 54=4)(55 thru 64=5) (65 thru 74=6)(75 thru high=7)(else=8) into agegp2. If lowqual=1 or baddem=1 or diaryday=-8 agegp=8. cro agegp by trhhchld. *note there are very old people in households with children, *however there are so few such cases that the older ages are *treated as one group. *need to deflate to sampled number. desc origwght. *the final weight weights up to the population size. *20720 diarists, mean 3968686, but this weight artificially *increases the child diarists compared to the adults. temp. select if age<18. desc origwght. temp. select if age>17. desc origwght. Do if age<18. compute origw2=origwght/4974410.21642539. Else if age>17. compute origw2=origwght/3919771.88535495. End if. desc origw2. compute agesexgp=agegp + 10*(sex-1). compute agesex2=agegp2 + 10*(sex-1). freq agesexgp agesex2. recode agesexgp agesex2 (0=1) (10=2) (1=21) (2=22) (3=23) (4=24) (5=25) (6=26) (7=27) (11=31) (12=32) (13=33) (14=34) (15=35) (16=36) (17=37) (8=90) (18=91). val lab agesexgp agesex2 1 "men 15-17" 2 "women 15-17" 21 "men 18-24" 22 "men 25-34" 23 "men 35-44" 24 "men 45-54" 25 "men 55-64" 26 "men 65-74" 27 "men 75+" 31 "women 18-24" 32 "women 25-34" 33 "women 35-44" 34 "women 45-54" 35 "women 55-64" 36 "women 65-74" 37 "women 75+" 90 "men miss age/bad diary" 91 "women miss age/bad diary". missing values agesexgp (90 thru high). cro agesexgp agesex2 by sex. means age by agesexgp agesex2 /cells min max. *this produces the left column exclude bad diary %. fre agesexgp. *these two produce the right column good diary *% and frequencies. temp. select if agesexgp<5. fre agesexgp. temp. select if agesexgp>5 and agesexgp<90. fre agesexgp. weight by origw2. *this produces the left column CPS%s. fre agesex2. *these two produce the right column CPS%. temp. select if age<18. fre agesex2. temp. select if agesexgp>17. fre agesex2. weight off. *NOTE that the CPS good diary numbers in the right column *are calculated by multiplying the percentage by the *number of good diaries in the age category. ********************************************************** * 20720 total diaries / 19759 good diaries * * All Cases Adult/Child * * exclude * CPS 941 * * CPS bad diary* % Good diaries * * % % * diaries * * 1 men 15-17 2.3 2.2 * 49.9 ( 453) 49.2 ( 447) * * 2 women 15-17 2.3 2.2 * 50.1 ( 455) 50.8 ( 462) * ********************************************************** * * 18489 good diaries* *21 men 18-24 6.1 3.1 * 6.4 (1181) 3.4 ( 632) * *22 men 25-34 8.7 6.6 * 9.3 (1716) 7.4 (1374) * *23 men 35-44 9.6 9.7 * 10.2 (1882) 10.9 (2011) * *24 men 45-54 8.9 8.0 * 9.4 (1734) 9.0 (1658) * *25 men 55-64 6.0 5.4 * 6.2 (1144) 6.0 (1110) * *26 men 65-74 3.7 3.5 * 3.7 ( 683) 3.9 ( 720) * *27 men 75+ 2.8 2.3 * 2.6 ( 480) 2.5 ( 467) * *31 women 18-24 6.0 3.8 * 6.4 (1181) 4.3 ( 794) * *32 women 25-34 8.8 9.6 * 9.6 (1771) 10.7 (1983) * *33 women 35-44 10.0 11.7 * 10.8 (1992) 13.1 (2431) * *34 women 45-54 9.3 9.6 * 9.9 (1826) 10.7 (1981) * *35 women 55-64 6.5 7.2 * 6.8 (1254) 8.0 (1484) * *36 women 65-74 4.4 4.7 * 4.4 ( 812) 5.2 ( 969) * *37 women 75+ 4.5 4.2 * 4.3 ( 793) 4.7 ( 875) * *Valid Total 100.0 93.6 * * *90 men bad diary 3.1 * * *91 women bad diary 3.4 * * *All bad diary 6.4 * * *All cases 100.0 * * **********************************************************. missing values all (). if agesexgp>89 origw2=0. *The older datasets covered samples of most contiguous states + *Washington DC, but did not draw samples from 11 states: *Delaware, Idaho, Kansas, Montana, Nevada, New Hampshire, *New Mexico, North Dakota, Rhode Island, Vermont, and Wyoming. *The 1992-94, 1995, 1998-1999 and 1999-2001 samples did cover *these states, but did not include Alaska and Hawaii. The ATUS *covers all 50 states. It is possible that with some analysis, *an apparent different across time may reflect the range of *states included. For this reason, we construct two weights *in addition to our recommended weight, one which excludes *the states not covered in the older samples, and a second *which includes all states and inflates to the size of the *national population. sort cases by pid. match files files=* file='C:\evrim\AHTUS\2003\tempa\excludestates.sav' /by pid. freq exclude. *6.7% of diarists are states included only in the most recent samples; *19342 in the states available in all years. temp. select if lowqual=0 and exclude=0. freq agesexgp. *CPS column % copied over from previous weights. *CPS numbers recalculated by hand. *this step creates the good diary by age numbers. temp. select if agesexgp<5 and exclude=0. freq agesexgp. temp. select if (agesexgp>5 and agesexgp<90) and exclude=0. freq agesexgp. ********************************************* *20720 total diaries * *18068 good diaries in states in all surveys* * CPS 844 good diaries * * % % * * 1 men 15-17 48.5 ( 416) 48.6 ( 410) * * 2 women 15-17 51.5 ( 442) 51.4 ( 434) * ********************************************* * 17225 good diaries * *21 men 18-24 6.4 (1112) 3.4 ( 588) * *22 men 25-34 9.3 (1615) 7.4 (1275) * *23 men 35-44 10.1 (1760) 10.8 (1864) * *24 men 45-54 9.3 (1617) 8.9 (1537) * *25 men 55-64 6.2 (1084) 6.0 (1040) * *26 men 65-74 3.7 ( 644) 3.9 ( 671) * *27 men 75+ 2.7 ( 463) 2.5 ( 436) * *31 women 18-24 6.5 (1127) 4.4 ( 751) * *32 women 25-34 9.6 (1670) 10.7 (1850) * *33 women 35-44 10.9 (1895) 13.2 (2283) * *34 women 45-54 9.9 (1721) 10.7 (1846) * *35 women 55-64 6.8 (1189) 8.0 (1379) * *36 women 65-74 4.4 ( 768) 5.3 ( 916) * *37 women 75+ 4.3 ( 756) 4.8 ( 828) * *********************************************. missing values all (). compute origw3=origw2. if agesexgp>89 or exclude=1 origw3=0. temp. select if agesexgp>89 or exclude=1. desc origw3. temp. select if origw3>0. desc origw3. weight by origw3. fre childm agesexgp. weight off. sort cases by agesexgp diaryday. aggregate outfile='C:\evrim\AHTUS\2003\tempa\group.sav' /break=agesexgp /grouptot=sum(origw2). aggregate outfile='C:\evrim\AHTUS\2003\tempa\day.sav' /break= agesexgp diaryday /daytot=sum(origw2) /dayn=nu. execute. match files file=* /table='C:\evrim\AHTUS\2003\tempa\group.sav' /by agesexgp. execute. match files file=* /table='C:\evrim\AHTUS\2003\tempa\day.sav' /by agesexgp diaryday. execute. sort cases by agesexgp exclude diaryday. aggregate outfile='C:\evrim\AHTUS\2003\tempa\group3.sav' /break=agesexgp exclude /groupt3=sum(origw3). aggregate outfile='C:\evrim\AHTUS\2003\tempa\day3.sav' /break= agesexgp exclude diaryday /daytot3=sum(origw3) /dayn3=nu. execute. match files file=* /table='C:\evrim\AHTUS\2003\tempa\group3.sav' /by agesexgp exclude. execute. match files file=* /table='C:\evrim\AHTUS\2003\tempa\day3.sav' /by agesexgp exclude diaryday. execute. compute exptot=(grouptot/7). compute exptot3=(groupt3/7). Do if lowqual=0 and baddem=0. compute recwght=(exptot/daytot)/(dayn/daytot). End if. Do if lowqual=0 and baddem=0 and exclude=0. compute xtimewt=(exptot3/daytot3)/(dayn3/daytot3). End if. desc recwght xtimewt. compute under18=0. if age<18 under18=1. cro exclude by under18. *891 child diaries in states in all samples; *18451 adult diaries in states in all samples. compute suma=0. compute sumc=0. if age>17 suma=recwght. if age<18 sumc=recwght. compute xsuma=0. compute xsumc=0. if age>17 xsuma=xtimewt. if age<18 xsumc=xtimewt. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=survey /recadsum = SUM(suma) /recchsum = SUM(sumc) /xadsum = SUM(xsuma) /xchildsum = SUM(xsumc). freq recadsum recchsum xadsum xchildsum. *the sum of adult weights is 19145.34 - it should sum to 19759. *the sum of child weights is 944.92 - it should sum to 961. *the sum of xtime adult weights is 17964.89 - it should sum to 18451. *the sum of child weights is 884.41 - it should sum to 891. Do if age>17. compute recwght=recwght*(19759/19145.346). Else if age<18. compute recwght=recwght*(961/944.924). End if. desc recwght. *mean is precisely 1. Do if age>17. compute xtimewt=xtimewt*(18451/17964.89). Else if age<18. compute xtimewt=xtimewt*(891/884.413). End if. desc xtimewt. temp. select if exclude=0. desc xtimewt. *mean among the states in all years is 1. weight by recwght. fre diaryday agesexgp. *the age/sex group distribution still matches the *CPS distribution from the original survey weights. cro agesexgp by diaryday /cell=row. cro diaryday by childm. weight off. *the numbers are means of original weights for adults and children. Do if age<18. compute infltwt=recwght*4974410.21642539. Else if age>17. compute infltwt=recwght*3919771.88535495. End if. desc infltwt. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2003\USA2003youthsum.sav' /drop sleep t1dig t2dig tu06fwgt anycare sex age TRHHCHLD misbasic agegp agegp2 origw2 agesexgp agesex2 exclude origw3 grouptot daytot dayn groupt3 daytot3 dayn3 exptot exptot3. sort cases by pid. Save outfile='C:\evrim\AHTUS\2003\tempa\addlow.sav' /keep hhid pid lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght childm. sort cases by survey wave hhid pid. select if childm=0. Save outfile='C:\evrim\AHTUS\2003\USA2003hfsum.sav' /keep survey wave hhid pid diaryday cday month year tottime numep t0pcare t1paid t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss tmain1 tmain2 tmain3 tmain4 tmain5 tmain6 tmain7 tmain8 tmain9 tmain10 tmain11 tmain12 tmain13 tmain14 tmain15 tmain16 tmain17 tmain18 tmain19 tmain20 tmain21 tmain22 tmain23 tmain24 tmain25 tmain26 tmain27 tmain28 tmain29 tmain30 tmain31 tmain32 tmain33 tmain34 tmain35 tmain36 tmain37 tmain38 tmain39 tmain40 tmain41 tmain42 tmain43 tmain44 tmain45 tmain46 tmain48 tmain49 tmain50 tmain51 tmain52 tmain53 tmain54 tmain55 tmain56 tmain57 tmain58 tmain60 tmain62 tmain63 tmain64 tmain65 tmain66 tmain67 tmain68 tmain70 tmain71 tmain72 tmain73 tmain74 tmain75 tmain76 tmain77 tmain78 tmain81 tmain82 tmain83 tmain84 tmain85 tmain86 tmain87 tmain88 tmain89 tmain90 tmain91 tmain92 tmain93 tmain94 tmain95 tmain96 tmain97 tmain98 tsc1 tsc2 tsc3 tsc4 tsc5 tsc6 tsc7 tsc8 tsc9 tsc10 tsc11 tsc12 tsc13 tsc14 tsc15 tsc16 tsc17 tsc18 tsc19 tsc20 tsc21 tsc22 tsc23 tsc24 tsc25 tsc26 tsc27 tsc28 tsc29 tsc30 tsc31 tsc32 tsc33 tsc34 tsc35 tsc36 tsc37 tsc38 tsc39 tsc40 tsc41 tsc42 tsc43 tsc44 tsc45 tsc46 tsc48 tsc49 tsc50 tsc51 tsc52 tsc53 tsc54 tsc55 tsc56 tsc57 tsc58 tsc60 tsc62 tsc63 tsc64 tsc65 tsc66 tsc67 tsc68 tsc70 tsc71 tsc72 tsc73 tsc74 tsc75 tsc76 tsc77 tsc78 tsc81 tsc82 tsc83 tsc84 tsc85 tsc86 tsc87 tsc88 tsc89 tsc90 tsc91 tsc92 tsc93 tsc94 tsc95 tsc96 tsc97 tsc98 outside inveh inside locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. Get file='C:\evrim\AHTUS\2003\USA2003hfep.SAV'. match files files=* table='C:\evrim\AHTUS\2003\tempa\addlow.sav' /BY pid. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. save outfile='C:\evrim\AHTUS\2003\USA2003youthep.sav'. select if childm=0. execute. SAVE OUTFILE='C:\evrim\AHTUS\2003\USA2003hfep.sav' /keep survey wave hhid pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. *check prevalence of secondary activities. compute anysec=0. compute sectime=0. compute secep=0. compute seccc=0. compute seccctm=0. compute secccep=0. Do If sec>0. compute anysec=1. compute sectime= time. compute secep=1. End if. Do If (sec>32 and sec<40) or sec=96 or sec=99. compute seccc=1. compute seccctm= time. compute secccep=1. End if. freq anysec secep seccc secccep. desc sectime seccctm. AGGREGATE /OUTFILE='C:\evrim\AHTUS\2003\tempa\aggr.sav' /BREAK=hhid /anysec 'any secondary activity' = MAX(anysec) /seccc 'any secondary childcare' = MAX(seccc) /sectime 'secodary activity time' = SUM(sectime) /seccctm 'secodary childcare time' = SUM(seccctm) /secccep '# of secondary childcare episodes' = SUM(secccep) /secep '# of secondary activity episodes' = SUM(secep) /epnum 'number of episodes' = MAX(epnum) /lowqual = MAX(lowqual). Get FILE='C:\evrim\AHTUS\2003\tempa\aggr.sav'. compute propsec= secep/epnum*100. compute pcc= secccep/epnum*100. select if lowqual=0. freq anysec seccc. desc sectime seccctm propsec pcc. temp. select if seccc=1. desc seccctm pcc. *test labels and variables. Get file='C:\evrim\AHTUS\2003\USA2003hfep.SAV'. desc survey wave hhid pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual origwght xtimewt infltwt recwght. freq survey wave diaryday cday month year epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual baddem caremflg. get file='C:\evrim\AHTUS\2003\USA2003hfsum.sav'. desc survey wave hhid pid diaryday cday month year tottime numep t0pcare t1paid t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss tmain1 to tsc98 outside inveh inside locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk origwght xtimewt infltwt recwght. compute t=sum(tmiss to tmain4) + sum(tmain6 to tmain42) + sum(tmain49 to tmain54) + sum(tmain56 to tmain63) + sum(tmain65 to tmain68) + tmain72 + tmain73 + sum(tmain75 to tmain81) + sum(tmain84 to tmain98). freq t. freq survey wave diaryday cday month year tottime numep lowqual baddem caremflg. temp. select if recwght=0. cro lowqual by baddem. temp. select if recwght~=0. freq diaryday. weight by recwght. freq diaryday. Get file='C:\evrim\AHTUS\2003\USA2003youthsum.sav' /keep survey wave hhid pid diaryday cday month year tottime numep t0pcare t1paid t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss tmain1 tmain2 tmain3 tmain4 tmain5 tmain6 tmain7 tmain8 tmain9 tmain10 tmain11 tmain12 tmain13 tmain14 tmain15 tmain16 tmain17 tmain18 tmain19 tmain20 tmain21 tmain22 tmain23 tmain24 tmain25 tmain26 tmain27 tmain28 tmain29 tmain30 tmain31 tmain32 tmain33 tmain34 tmain35 tmain36 tmain37 tmain38 tmain39 tmain40 tmain41 tmain42 tmain43 tmain44 tmain45 tmain46 tmain48 tmain49 tmain50 tmain51 tmain52 tmain53 tmain54 tmain55 tmain56 tmain57 tmain58 tmain60 tmain62 tmain63 tmain64 tmain65 tmain66 tmain67 tmain68 tmain70 tmain71 tmain72 tmain73 tmain74 tmain75 tmain76 tmain77 tmain78 tmain81 tmain82 tmain83 tmain84 tmain85 tmain86 tmain87 tmain88 tmain89 tmain90 tmain91 tmain92 tmain93 tmain94 tmain95 tmain96 tmain97 tmain98 tsc1 tsc2 tsc3 tsc4 tsc5 tsc6 tsc7 tsc8 tsc9 tsc10 tsc11 tsc12 tsc13 tsc14 tsc15 tsc16 tsc17 tsc18 tsc19 tsc20 tsc21 tsc22 tsc23 tsc24 tsc25 tsc26 tsc27 tsc28 tsc29 tsc30 tsc31 tsc32 tsc33 tsc34 tsc35 tsc36 tsc37 tsc38 tsc39 tsc40 tsc41 tsc42 tsc43 tsc44 tsc45 tsc46 tsc48 tsc49 tsc50 tsc51 tsc52 tsc53 tsc54 tsc55 tsc56 tsc57 tsc58 tsc60 tsc62 tsc63 tsc64 tsc65 tsc66 tsc67 tsc68 tsc70 tsc71 tsc72 tsc73 tsc74 tsc75 tsc76 tsc77 tsc78 tsc81 tsc82 tsc83 tsc84 tsc85 tsc86 tsc87 tsc88 tsc89 tsc90 tsc91 tsc92 tsc93 tsc94 tsc95 tsc96 tsc97 tsc98 outside inveh inside locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght childm. select if childm=1. desc survey wave hhid pid diaryday cday month year tottime numep t0pcare t1paid t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss tmain1 to tsc98 outside inveh inside locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk xtimewt infltwt origwght recwght. freq survey wave diaryday cday month year tottime numep lowqual baddem caremflg. temp. select if recwght=0. cro lowqual by baddem. temp. select if recwght~=0. freq diaryday. weight by recwght. freq diaryday. **child summary file**. weight off. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2003\Harmonised files\USA2003youthsum.sav' /drop childm /compressed. Get file='C:\evrim\AHTUS\2003\USA2003youthep.sav' /keep survey wave hhid pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght childm. select if childm=1. desc survey wave hhid pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp origwght xtimewt infltwt recwght. freq survey wave diaryday cday month year epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual baddem caremflg. **child episode file**. weight off. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2003\harmonised Files\USA2003youthep.sav' /drop childm /compressed. ********************************************** *put adult files in 'Harmonised Files' folder* **********************************************. **adult summary file**. get file='C:\evrim\AHTUS\2003\usa03quest.sav'. sort cases by survey wave hhid pid. get file='C:\evrim\AHTUS\2003\USA2003hfsum.sav'. sort cases by survey wave hhid pid. Match files file='C:\evrim\AHTUS\2003\USA2003hfsum.sav' /in=tusag file='C:\evrim\AHTUS\2003\usa03quest.sav' /in=dem /BY survey wave hhid pid. cro tusag by dem. delete variables tusag dem. weight off. apply dictionary from 'C:\evrim\AHTUS\schema2.sav'. sort cases by survey wave hhid pid. Save outfile='C:\evrim\AHTUS\2003\Harmonised files\USA2003hfsum.sav' /keep survey wave hhid pid diaryday cday month year tottime numep t0pcare t1paid t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss tmain1 tmain2 tmain3 tmain4 tmain5 tmain6 tmain7 tmain8 tmain9 tmain10 tmain11 tmain12 tmain13 tmain14 tmain15 tmain16 tmain17 tmain18 tmain19 tmain20 tmain21 tmain22 tmain23 tmain24 tmain25 tmain26 tmain27 tmain28 tmain29 tmain30 tmain31 tmain32 tmain33 tmain34 tmain35 tmain36 tmain37 tmain38 tmain39 tmain40 tmain41 tmain42 tmain43 tmain44 tmain45 tmain46 tmain48 tmain49 tmain50 tmain51 tmain52 tmain53 tmain54 tmain55 tmain56 tmain57 tmain58 tmain60 tmain62 tmain63 tmain64 tmain65 tmain66 tmain67 tmain68 tmain70 tmain71 tmain72 tmain73 tmain74 tmain75 tmain76 tmain77 tmain78 tmain81 tmain82 tmain83 tmain84 tmain85 tmain86 tmain87 tmain88 tmain89 tmain90 tmain91 tmain92 tmain93 tmain94 tmain95 tmain96 tmain97 tmain98 tsc1 tsc2 tsc3 tsc4 tsc5 tsc6 tsc7 tsc8 tsc9 tsc10 tsc11 tsc12 tsc13 tsc14 tsc15 tsc16 tsc17 tsc18 tsc19 tsc20 tsc21 tsc22 tsc23 tsc24 tsc25 tsc26 tsc27 tsc28 tsc29 tsc30 tsc31 tsc32 tsc33 tsc34 tsc35 tsc36 tsc37 tsc38 tsc39 tsc40 tsc41 tsc42 tsc43 tsc44 tsc45 tsc46 tsc48 tsc49 tsc50 tsc51 tsc52 tsc53 tsc54 tsc55 tsc56 tsc57 tsc58 tsc60 tsc62 tsc63 tsc64 tsc65 tsc66 tsc67 tsc68 tsc70 tsc71 tsc72 tsc73 tsc74 tsc75 tsc76 tsc77 tsc78 tsc81 tsc82 tsc83 tsc84 tsc85 tsc86 tsc87 tsc88 tsc89 tsc90 tsc91 tsc92 tsc93 tsc94 tsc95 tsc96 tsc97 tsc98 outside inveh inside locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. **adult episode file**. get file='C:\evrim\AHTUS\2003\USA2003hfep.sav'. weight off. sort cases by survey wave hhid pid. apply dictionary from 'C:\evrim\AHTUS\schema1.sav'. Save outfile='C:\evrim\AHTUS\2003\Harmonised files\USA2003hfep.sav' /keep survey wave hhid pid diaryday cday month year time clockst start end epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. ************************************************** **The end of the syntax producing ** **the USA heritage time use files BSL-ATUS 2003 ** **************************************************.