**************************************************** **Syntax producing the USA heritage time use files** **1965-1966 ** **written by Dr. Kimberly Fisher ** **weighting section of the programme part-written ** **by Professor Jonathan Gershuny ** **Institute for Social and Economic Research ** **University of Essex, Wivenhoe Park Colchester ** **United Kingdom ** **9 April 2006, amended 18 August 2010 ** ****************************************************. *RECODE ACT5 to -9 because no such instances. ************************ *extract base variables* ************************. get file='C:\Documents and Settings\All Users\Documents\time-use-library\USA\1965-66\us67evn.sav' /keep id actno prim sec where who1 who2 start end sex day year daywgt demowgt. select if year=65. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV' /drop year. *get variables to attempt to create month of diary variable. GET FILE='C:\Documents and Settings\All Users\Documents\time-use-library\USA\1965-66\us65-66turp.sav' /keep id v7 v9 v105 v14 urbrural v21 v117 v118r2 v118r1 v122 v123r2 v123r1 race. sort cases by id. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65addmonth.sav'. ******************* *begin conversions* *******************. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV' /keep id day. Do if day=9 and id=LAG(id). Compute day=LAG(day). End if. freq day. match files files=* /table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65addmonth.sav' /by id. recode v7 v9 v105 (sysmis=-5). freq v7 v9 v105. cro day by v7 v9 v105. compute nv7=v7. compute nv9=v9. Do if V7>V9 and V7>-5 and V9>-5. compute V7=nv9. compute V9=nv7. End if. cro v105 by v7 v9. freq race urbrural v14. compute survey=1. if urbrural>0 survey=0. recode urbrural (sysmis=-8). val lab survey 0 "1965-66 USA Szalai Jackson sample" 1 "1965-66 USA national sample". cro survey by urbrural. compute ethnic=-8. If race=1 ethnic=1. If race=2 ethnic=2. If race>2 and race<9 ethnic=4. val lab ethnic -9 not asked -8 missing -2 refusal 1 white 2 black 3 Asian 4 some other race 5 Hispanic. cro race by ethnic. compute urban=-8. val lab urban -8 missing 0 rural 1 urban. Do if v14>3 and v14<9. compute urban=0. Else if v14>-1 and v14<4. compute urban=1. End if. Do if urbrural=2 and urban=-8. compute urban=0. Else if urbrural=1 and urban=-8. compute urban=1. End if. cro v14 urbrural by urban. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65addmonthag.sav' /BREAK=id /day = MAX(day) /v7 = MAX(v7) /v9 = MAX(v9) /v105 = MAX(v105) /ethnic = MAX(ethnic) /urban = MAX (urban) /survey = MAX(survey). rename variables id=pid. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65addethurb.sav' /BREAK=pid /urban = MAX (urban). GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65addmonthag.sav'. compute test=v9-v7. cro test by day. *after much fiddling with this data, I observed the following: *V7 (labelled day of first interview) and V9 (labelled final interview) *suggest that 93.9% of diary interviews were collected between 2 and *9 days after the first contact with respondents to explain the diary, *which appears consistent with the documentation and published *references to the data. *e-mail from John Robinson notes that ids indicate if data collected *in 65 or 66. 829 cases with an id below 1000; rest have ids *above 2000. JR reports low ids correspond to 1965. Do if id<1000. compute year=1965. Else if id>1999. compute year=1966. End if. SORT CASES BY year (A) v105 (A) day (A) v7 (A). temp. select if year=1965. freq v105. temp. select if year=1966. freq v105. MEANS TABLES=id BY v105 BY year /CELLS MEAN COUNT STDDEV. *the coding of v105 and the id sequence is more consistent *for 1965 than for 1966. It does seem that the values of *V7 cluster into 2 or 3 sets, likely indicating whether the *study was collected in the first or second week (or 3rd week) *of the month when the diaries were collected. Do if year=1965 and v105>0 and v105<4. compute month=11. Else if year=1965 and v105>3. compute month=12. Else if year=1966 and v105=1. compute month=1. Else if year=1966 and (v105=2 or v105=6 or v105=7). compute month=2. Else if year=1966 and (v105=3 or v105=8). compute month=3. Else if year=1966 and v105=4. compute month=4. Else if year=1966 and v105=5. compute month=5. Else. compute month=-8. End if. freq month. sort cases by id. SAVE OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65my.SAV' /keep id year month survey. rename variables (id=pid). SAVE OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65demadd.SAV' /keep survey pid year ethnic urban. *pull out file of diaries with the combined gardening/ *animal care activity to look for ways to separate the *two activities. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV'. compute marker=0. if prim=17 or sec=17 marker=1. freq marker. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\aggr.sav' /BREAK=id /mark = MAX(marker). match files files=* table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\aggr.sav' /by id. select if mark=1. execute. sort cases by id(a) actno(d). Do If end=2400 and LAG(start)=2400. compute end=2359. end if. execute. recode start (2400=2359). sort cases by id actno. Compute start2=trunc(start/100)*60+(start-(trunc(start/100))*100). Compute end2=trunc(end/100)*60+(end-(trunc(end/100))*100). compute time=end2-start2. execute. temp. select if prim=17 or sec=17. means time /cells = min max median. temp. select if (prim=17 or sec=17) and time<11. means time /cells = min max median. temp. select if (prim=17 or sec=17) and time>10. means time /cells = min max median. compute x=0. if id=lag(id) and prim=45 and (lag(prim)=17 or lag(sec)=17) x=1. if id=lag(id) and (prim=10 or prim=11 or sec=10 or sec=11) and lag(time)<21 and (lag(prim)=17 or lag(sec)=17) x=1. freq x. select if x=1. var lab x marker time with animal. compute actno=actno-1. execute. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\xanimal.SAV' /keep id actno x. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV'. freq end start. *investiagte 10 cases of start time listed as 24:00. select if start=2400. execute. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV'. select if id=5705 or id=5709 or id=5710 or id=5723 or id=5746 or id=5762 or id=5766 or id=5767 or id=5789 or id=6087. execute. *note - these 10 cases with the start time of 24:00 are people *who report changing activity at midnight - last/censored activity *recorded as 1 minute. *now check for number of cases with 1 minute activities. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV'. select if start=end. execute. *only the 10 cases of start & end time=2400 fit this pattern. *in these cases, the 10 respondents have recorded a last *activity with a duration of 1 minute (presumably continuing *past midnight). We do not want to lose this information, but *we also want to have only 1440 minutes for these diaries. For *these cases, the last activity is recoded to last one minute *starting at 23:59 and ending at 24:00. GET FILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65a.SAV'. sort cases by id. *match in month and year variables. match files files=* table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA65my.SAV' /BY ID. *confirm all activities start at time 0. temp. select if actno=1. freq start. sort cases by id(a) actno(d). Do If end=2400 and LAG(start)=2400. compute end=2359. end if. execute. recode start (2400=2359). sort cases by id actno. Compute start2=trunc(start/100)*60+(start-(trunc(start/100))*100). Compute end2=trunc(end/100)*60+(end-(trunc(end/100))*100). Execute. temp. select if start>60 and start<250. cro start by start2. temp. select if end>60 and end<250. cro end by end2. desc end2 start2. *create duration variable. compute time=end2-start2. desc time. *as the variable named sec already exists, rename. rename variables (sec=origsec). val lab prim origsec 0 normal work outside home 1 main job, work at home 2 overtime main job 3 displacements during main job 4 'waiting/interrupted at main job' 5 work on second job 6 meal at workplace 7 'time at workplace before/after work' 8 breaks during paid work 9 travel to work, wait for transport 10 prepare and cook food 11 washing up, put away dishes 12 indoor cleaning 13 outdoor cleaning 14 laundry, ironing 15 repair, upkeep clothes & shoes 16 other home repairs or upkeep 17 gardening and animal care 18 heat and water supply or upkeep 19 paperwork, unusual care, other unpaid 20 care for babies 21 care for older children 22 supervise, help with school work 23 read to children 24 indoor games & instruction with child 25 outdoor games & walks with child 26 medical services for child 27 other child care 29 travel to accompany children 30 purchase everyday goods & products 31 purchase durables 32 purchase personal care services 33 receive medical care outside home 34 purchase administrative services 35 purchase repair, laundry, other services 36 waiting to purchase goods or services 37 other purchasing of services 39 goods & services purchase travel 40 hygiene, dress, get up, go to bed 41 personal medical care at home 42 care for adults 43 meals and snacks at home 44 other meals, snacks away from home 45 night-time sleep 46 day-time sleep 47 nap or rest 48 private activities, undesc personal care 49 travel relating to personal care 50 classes as part of FT education 51 special class or training session 52 attend occassional lecture 53 political, union training 54 homework 55 reading for job, own instruction 56 other education or training 58 unlabelled education 59 education travel, wait for transport 60 political party, union activities 61 voluntary activity as elected official 62 other participation voluntary meetings 63 general voluntary activity 64 activities for religious organisation 65 worship, religious ceremonies 66 participate in factory councils 67 participate in other associations 68 other voluntary, religious, participatory 69 voluntary or religious activity travel 70 attend sports event 71 attend circus, dance, show, night club 72 see film 73 theatre, concert, opera 74 museum, exhibition 75 receive friends, visit friends 76 party or reception 77 café, bar, tearoom 78 other out of home leisure 79 travel related to out of home leisure 80 participate in sports, exercise 81 excursions, hunting, fishing 82 walks 83 technical hobbies, collections 84 ladie's work - needle, knit, confection 85 artistic creations 86 play musical instrument 87 society games 88 other indoor leisure 89 travel related to sport or in home leisure 90 listen to radio 91 watch television 92 listen to records 93 read books 94 read periodicals, pamphlets 95 read newspapers 96 conversations inc phone 97 write private correspondence 98 relax, think, plan, do nothing 99 travel connected with media use. freq prim origsec. *note that the code 99, which the code frame says is media *related travel, must really be no secondary activity for the *secondary activity codes. *create time use variables. compute main=-5. compute sec=-5. compute inout=-5. compute epnum=actno. compute eloc=-5. compute mtrav=-9. compute clockst= start. compute alone=0. compute infant=0. compute child=0. compute sppart=0. compute clsfam=0. compute hhadult=0. compute animal=0. compute shoprof=0. compute cowork=0. compute wellknw=0. compute otherp=0. compute unknwp=0. recode day (1=2) (2=3) (3=4) (4=5) (5=6) (6=7) (7=1) (9=-8) INTO diaryday. compute wave=1. compute hhid=id. compute cday=-9. compute pid=id. apply dictionary from 'C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\History of harmonisation - Diary\schema\schema1.sav'. cro day by diaryday. *as day information only added to the first day, recode variable so day *appears alongside all episodes. Do if day=9 and id=LAG(id). Compute diaryday=LAG(diaryday). End if. Do if sex=9 and id=LAG(id). Compute sex=LAG(sex). End if. freq diaryday sex. temp. select if diaryday=-8. freq id. *only one diary has day completed unknown. cro who1 by who2. *note 16 cases where someone else present recorded in who2 *when the value for who1 is alone. Who1 cannot be treated *on its own for value assignment. freq who1 who2. *note that the 9 category includes others as well *as refused - most irritating to have missing and *non-missing glumpted together. temp. select if (prim>19 and prim<30) or (origsec>19 and origsec<30). freq who1 who2. temp. select if ((prim>19 and prim<30) or (origsec>19 and origsec<30)) and who1=0 and who2=0. freq prim origsec. *note also that problems arise with people reporting *categories of activity which by their nature imply *interaction with another person (for instance 23 - *talk to/read to child) but the who is present column *is listed as alone. It is possible to undertake *some care activities alone, for instance travel to *accompany a child may involve the presence of the *child one one part of the trip but not the other. *the 155 cases where child care supposedly was performed *alone were examined separately in detail. *If both who else is present variables are alone and *the main or secondary activity involves interaction, *that is 20 - care for babies, 23 - read to child, *24 - indoor games or instruction with child, or 25 - *outdoor games or walks with child, then the alone *is coded as not alone. If who1=0 and who2=0 alone=1. If alone=1 and (prim=20 or (prim>22 and prim<26) or origsec=20 or (origsec>22 and origsec<26)) alone=0. cro who1 by alone. Temp. select if alone=1. freq prim origsec. If prim=20 or origsec=20 infant=1. freq infant. temp. select if infant=1. freq prim origsec. If (prim=20 or (prim>22 and prim<26) or origsec=20 or (origsec>22 and origsec<26)) child=1. If (who1=2 or who2=2 or who1=4 or who2=4 or who1=7 or who2=7 or who1=9 or who2=9) and (prim=21 or prim=22 or prim=26 or prim=27 or prim=29 or origsec=21 or origsec=22 or origsec=26 or origsec=27 or origsec=29) child=1. freq child. cro prim origsec by child. temp. select if child=0 and ((prim>19 and prim<30) or (origsec>19 and origsec<30)). freq who1 who2 alone. If who1=1 or who2=1 sppart=1. cro who1 who2 by sppart. If who1=1 or who1=2 or who2=1 or who2=2 clsfam=1. cro who1 who2 by clsfam. If (who1=3 or who2=3) hhadult=1. cro who1 who2 by hhadult. temp. select if prim=17 or origsec=17. freq where. temp. select if prim=17 or origsec=17. cro prim by origsec. *animal care and gardening were combined in the original codes. *the diaries containing these codes were examined in detail. *diarists who wake up from a main sleep then next engage in an *episode of act=17, who engage in act 17 before going to sleep, *who have just cooked food or washed up then do a short *episode of <21 minutes - and vice versa - of act=17, *who are eating, cooking, washing up, doing indoor cleaning, *walking for sport or pleasure, doing crafts, watching TV, *reading a paper or writing correspondence at the same time as *doing act=17, or instances of act=17 that lasts 20 minutes or *less and take place before 7:01 or after 20:59 are assumed to *be animal care and not gardening. if id=lag(id) and lag(prim)=45 and (prim=17 or origsec=17) animal=1. if id=lag(id) and (lag(prim)=10 or lag(prim)=11 or lag(origsec)=10 or lag(origsec)=11) and time<21 and (prim=17 or origsec=17) animal=1. if (where=2 or prim=10 or prim=11 or prim=12 or prim=43 or prim=82 or prim=84 or prim=91 or prim=95 or prim=97 or origsec=10 or origsec=11 or origsec=12 or origsec=43 or origsec=82 or origsec=84 or origsec=91 or origsec=95 or origsec=97) and (prim=17 or origsec=17) animal=1. If time<21 and (prim=17 or origsec=17) and (start2<421 or end2>1259) animal=1. freq animal. match files files=* files='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\xanimal.SAV' /by id actno. cro x by animal. *add in other 33 episodes of time with animals. If x=1 animal=1. freq animal. If who1=8 or who2=8 or (prim>30 and prim<36) or prim=37 or (prim>49 and prim<53) or (prim>70 and prim<75) or prim=77 or (origsec>30 and origsec<36) or origsec=37 or (origsec>49 and origsec<53) or (origsec>70 and origsec<75) or origsec=77 shoprof=1. cro who1 who2 by shoprof. temp. select if shoprof=1. freq prim origsec. If who1=5 or who1=6 or who2=5 or who2=6 or (where=3 and (who1=9 or who2=9)) or prim=66 or origsec=66 cowork=1. cro who1 who2 where by cowork. If who1=4 or who1=7 or who2=4 or who2=7 or prim=42 or prim=75 or prim=76 or prim=87 or origsec=42 or origsec=75 or origsec=76 or origsec=87 or clsfam=1 or hhadult=1 or cowork=1 wellknw=1. cro who1 who2 by wellknw. If (prim=61 or prim=62 or prim=64 or prim=67 or prim=70 or prim=77 or prim=78 or origsec=61 or origsec=62 or origsec=64 or origsec=67 or origsec=70 or origsec=77 or origsec=78) or (who1=9 and who2<9) or (who1<9 and who2=9) otherp=1. cro who1 who2 by otherp. temp. select if otherp=1. freq prim. If alone=0 and infant=0 and child=0 and shoprof=0 and wellknw=0 and otherp=0 unknwp=1. cro who1 who2 alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp by unknwp. *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, and residual set to -8. Do if where= 7 or prim=13 or prim=25 or prim=81 or prim=82 or origsec=13 or origsec=25 or origsec=81 or origsec=82 or ((prim=80 or origsec=80) and (where=2 or where=8)) or ((prim=70 or prim=78 or origsec=70 or origsec=78) and where~=6) or ((prim=17 or origsec=17) and animal=0 and time>14). compute inout=1. Else if where= 2 or prim=9 or prim=29 or prim=39 or prim=49 or prim=59 or prim=69 or prim=79 or prim=89 or prim=99 or origsec=9 or origsec=29 or origsec=39 or origsec=49 or origsec= 59 or origsec= 69 or origsec=79 or origsec=89. compute inout=3. Else if where=1 or where=4 or where=5 or where=6 or prim=1 or prim=41 or prim=43 or prim=50 or prim=26 or prim=32 or prim=33 or prim=34 or prim=10 or prim=11 or prim=12 or prim=14 or prim=24 or prim=70 or prim=71 or prim=72 or prim=73 or prim=74 or prim=77 or origsec=1 or origsec= 41 or origsec=43 or origsec=50 or origsec=26 or origsec=32 or origsec=33 or origsec=34 or origsec=10 or origsec=11 or origsec=12 or origsec=14 or origsec=24 or origsec=70 or origsec=71 or origsec=72 or origsec=73 or origsec=74 or origsec=77. compute inout=2. Else. compute inout=-8. End if. freq inout. temp. select if inout=1. freq prim origsec where. temp. select if inout=2. freq prim origsec where. temp. select if inout=3. freq prim origsec where. temp. select if inout=-8. freq prim origsec where. *note that medical services are not treated like other *services as a marker of at services when the location *is other or missing. The reason is that in some cases *diarists appear to have completed diaries in hospital, *and this recoding creates a false impression of a *change of location when the main activity in the *hospital changes. Do if where=1. compute eloc=1. Else if where=4. compute eloc=2. Else if where=3 or prim=6 or prim=7 or origsec=6 or origsec=7. compute eloc=3. Else if where=5 or prim=77 or origsec=77. compute eloc=6. Else if where=2 or inout=3. compute eloc=8. Else if (prim>49 and prim<53). compute eloc=4. Else if prim=65. compute eloc=7. Else if (prim>29 and prim<33) or (prim>33 and prim<39) or (origsec>29 and origsec<33) or (origsec>33 and origsec<39). compute eloc=5. Else if where<9. compute eloc=9. Else if prim=43 or origsec=43. compute eloc=1. Else if prim=71 or origsec=71 or prim=73 or origsec=73 or prim=78 or origsec=78. compute eloc=9. Else. compute eloc=-8. End if. freq eloc. cro eloc by where. temp. select if eloc=4. freq prim origsec. temp. select if eloc=5. freq prim origsec. temp. select if eloc=7. freq prim origsec. compute prevloc=-3. compute prevact=-3. Do if id=lag(id) and epnum>lag(epnum). compute prevloc=lag(eloc). compute prevact=lag(prim). end if. temp. select if eloc=-8. freq prevloc. temp. select if eloc=-8 and prevloc>0. cro prim by prevact. *There are a number of episodes where the previous location is reported, *but the subsequent location is not reported - though in cases where the *person has not travelled, the previous location can be extended to fill *the gap. cro eloc by inout. *as we begin this process there are 210 unknown locations. temp. select if eloc=-8 and prim=prevact and prevloc>0. freq prim. Do if id=lag(id). Do if eloc=-8 and prim=prevact and prevloc>0. *note the test above shows none of these *cases are travelling - if doing the same *thing but some context like who else present * only changed or added secondary activity, *assume location remains the same. compute eloc=prevloc. compute inout=lag(inout). Else if eloc=-8 and ((prim>9 and prim<29) or (prim>39 and prim<49) or prim=75 or (prim>82 and prim<89) or (prim>89 and prim<99)) and ((prevact>9 and prevact<29) or (prevact>39 and prevact<49) or prevact=75 or (prevact>82 and prevact<89) or (prevact>89 and prevact<99)) and prevloc>0. *these are cases where both the previous and subsequent activity are *at a home activities, missing location set to previous location. compute eloc=prevloc. Else if eloc=-8 and ((prim>0 and prim<9) or (prim>29 and prim<38) or prim=50 or (prim>69 and prim<79)) and ((prevact>0 and prevact<9) or (prevact>29 and prevact<38) or prevact=50 or (prevact>69 and prevact<79)) and prevloc>0. *these are cases where both the previous and subsequent activity are *away from a home activities. compute eloc=prevloc. End if. End if. cro eloc by inout. *158 unknown locations remain. temp. select if eloc=-8. cro prim by prevact. *17 cases where missing time is first episode. compute nextloc=-3. if lag(epnum)=1 and lag(eloc)=-8 nextloc=eloc. freq nextloc. temp. select if nextloc=1. freq id prim prevact. *9 of the 17 cases where the first activity location is missing but *the first activity is sleep, TV or read have the next activity at *own home - set these locations to own home. Do if (id=5154 or id=5797 or id=5799 or id=5800 or id=5803 or id=5808 or id=5831 or id=6702 or id= 6703) and epnum=1. compute eloc=1. compute inout=2. End if. freq eloc. *149 cases of location missing. *as code 1 is all main work and not just work *at home, code 1 with missing location could *not be reassinged. temp. select if eloc=-8. freq prim origsec. Do if prim=48. Compute main=1. Else if prim=45 or prim=46. Compute main=3. Else if prim=47. Compute main=5. Else if prim=40. Compute main=6. Else if prim=41. Compute main=7. Else if prim=6. Compute main=8. Else if prim=43 or prim=44. Compute main=9. *Else if prim=0 or (prim>1 and prim<5). *old line eliminated as could not be created - see below. Else if prim=1 and where~=1. Compute main=10. *Else if prim=1. *old line eliminated as contained all main job work - see below. Else if prim=1 and where=1. Compute main=11. Else if prim=5. Compute main=12. Else if prim=8. Compute main=13. Else if prim=7. Compute main=14. Else if prim=50. Compute main=16. Else if prim=54. Compute main=17. Else if prim=51 or prim=52. Compute main=18. Else if prim=55 or prim=56 or prim=58. *58, the unlabelled education category added here - see below. Compute main=19. Else if prim=10. Compute main=20. Else if prim=11. Compute main=21. Else if prim=12 or prim=13. Compute main=22. Else if prim=14 or prim=15. Compute main=23. Else if prim=16. Compute main=24. Else if prim=18 or prim=19. Compute main=25. Else if prim=30 or prim=36. Compute main=26. Else if prim=31. Compute main=27. Else if prim=32. Compute main=28. Else if prim=33. Compute main=29. Else if prim=35. Compute main=30. Else if prim=34. Compute main=31. Else if prim=37. Compute main=32. Else if prim=20. Compute main=33. Else if prim=21. Compute main=34. Else if prim=26. Compute main=35. Else if prim=24. Compute main=36. Else if prim=22. Compute main=37. Else if prim=23. Compute main=38. Else if prim=27. Compute main=39. Else if prim=42. Compute main=40. Else if prim=63 or prim=68. Compute main=41. Else if prim=53 or prim=60. Compute main=42. *note that the original data contains no cases where this *activity is reported. For the summary file, the variable *based on this activity is set to -9. While it is likely *that some diarists did indeed under take this activity, *the number of instances likely was low. The number of *episodes of union activity is 14 in 1975-76; 18 in 1985; *and 44 in 1992-94. In all likelihood the survey team simply *collapsed this activity into the more general organisational *participation category and did not amend the documentation. *It is possible that this is a sample artefect, but there is *no way to verify the answer. Else if prim=66. Compute main=43. Else if prim=61 or prim=62 or prim=67. Compute main=46. Else if prim=64. Compute main=48. Else if prim=65. Compute main=49. Else if prim=78. Compute main=50. Else if prim=70. Compute main=51. Else if prim=72. Compute main=52. Else if prim=73. Compute main=53. Else if prim=74. Compute main=54. Else if prim=71. Compute main=55. Else if prim=77. Compute main=56. Else if prim=76. Compute main=57. Else if prim=80. Compute main=60. Else if prim=82. Compute main=62. Else if prim=25. Compute main=65. Else if prim=81. Compute main=66. Else if prim=17 and animal=0. Compute main=67. Else if prim=17 and animal=1. Compute main=68. Else if prim=88. Compute main=70. Else if prim=75. Compute main=72. Else if prim=87. Compute main=73. Else if prim=86. Compute main=74. Else if prim=85. Compute main=75. Else if prim=84. Compute main=76. Else if prim=83. Compute main=77. Else if prim=98. Compute main=78. Else if prim=93. Compute main=81. Else if prim=94. Compute main=82. Else if prim=95. Compute main=83. Else if prim=92. Compute main=84. Else if prim=90. Compute main=85. Else if prim=91. Compute main=86. Else if prim=97. Compute main=87. Else if prim=96. Compute main=88. Else if prim=49. Compute main=91. Else if prim=9. Compute main=93. Else if prim=59. Compute main=94. Else if prim=39. Compute main=95. Else if prim=29. Compute main=96. Else if prim=69. Compute main=97. Else if prim=79 or prim=89 or prim=99. Compute main=98. End if. freq main. *note that this produces 474 cases still coded as -5 - a code which *should not remain. [the poblem subsequently fixed above, but this *comment left to document the change made to the original file and *the reason for the change]. temp. select if main=-5. freq prim. *all these cases have the code 58, which appears in the education section, *but which the documentation describes as "not to be used". *Three education codes with labels, 52 (attend occassional lectures), *53 (political or union training course), and 55 (read scientific reviews or *journals for work or own instruction) have no cases; 58, the unlabelled code *apparently in education has 474 cases, compared with 47 regular schooling (50); *42 special training (51), 128 homework (54), 48 other education (56), and *145 travel to education (59). *also a problems with paid work - loads of cases of episodes codes as 1 - *labelled in documentation as paid work at home or work brought home, but no *cases coded as 0 (main job), 2 (overtime - main job), 3 (displacements at work), *or 4 (waiting at main job). temp. select if prim=1. freq where. temp. select if prim=58. freq where. *95% of the odd education category takes place at home, none takes place at school. *in contrast, 87% of "work at home" takes place at the workplace, and only 5% takes *place at home. temp. select if main<15. cro prim by main. temp. select if main>14 and main<28. cro prim by main. temp. select if main>27 and main<42. cro prim by main. temp. select if main>41 and main<56. cro prim by main. temp. select if main>55 and main<70. cro prim by main. temp. select if main>69 and main<84. cro prim by main. temp. select if main>83. cro prim by main. freq origsec. Do if origsec=48. Compute sec=1. Else if origsec=45 or origsec=46. Compute sec=3. Else if origsec=47. Compute sec=5. Else if origsec=40. Compute sec=6. Else if origsec=41. Compute sec=7. Else if origsec=6. Compute sec=8. Else if origsec=43 or origsec=44. Compute sec=9. *Else if origsec=0 or (origsec>1 and origsec<5). *old line eliminated as could not be created - see below. Else if origsec=0 or (origsec=1 and where~=1). Compute sec=10. *Else if origsec=1. *old line eliminated as contained all sec job work - see below. Else if origsec=1 and where=1. Compute sec=11. Else if origsec=5. Compute sec=12. Else if origsec=8. Compute sec=13. Else if origsec=7. Compute sec=14. Else if origsec=50. Compute sec=16. Else if origsec=54. Compute sec=17. Else if origsec=51 or origsec=52. Compute sec=18. Else if origsec=55 or origsec=56 or origsec=58. *58, the unlabelled education category added here - see below. Compute sec=19. Else if origsec=10. Compute sec=20. Else if origsec=11. Compute sec=21. Else if origsec=12 or origsec=13. Compute sec=22. Else if origsec=14 or origsec=15. Compute sec=23. Else if origsec=16. Compute sec=24. Else if origsec=18 or origsec=19. Compute sec=25. Else if origsec=30 or origsec=36. Compute sec=26. Else if origsec=31. Compute sec=27. Else if origsec=32. Compute sec=28. Else if origsec=33. Compute sec=29. Else if origsec=35. Compute sec=30. Else if origsec=34. Compute sec=31. Else if origsec=37. Compute sec=32. Else if origsec=20. Compute sec=33. Else if origsec=21. Compute sec=34. Else if origsec=26. Compute sec=35. Else if origsec=24. Compute sec=36. Else if origsec=22. Compute sec=37. Else if origsec=23. Compute sec=38. Else if origsec=27. Compute sec=39. Else if origsec=42. Compute sec=40. Else if origsec=63 or origsec=68. Compute sec=41. Else if origsec=53 or origsec=60. Compute sec=42. Else if origsec=66. Compute sec=43. Else if origsec=61 or origsec=62 or origsec=67. Compute sec=46. Else if origsec=64. Compute sec=48. Else if origsec=65. Compute sec=49. Else if origsec=78. Compute sec=50. Else if origsec=70. Compute sec=51. Else if origsec=72. Compute sec=52. Else if origsec=73. Compute sec=53. Else if origsec=74. Compute sec=54. Else if origsec=71. Compute sec=55. Else if origsec=77. Compute sec=56. Else if origsec=76. Compute sec=57. Else if origsec=80. Compute sec=60. Else if origsec=82. Compute sec=62. Else if origsec=25. Compute sec=65. Else if origsec=81. Compute sec=66. Else if origsec=17 and animal=0. Compute sec=67. Else if origsec=17 and animal=1. Compute sec=68. Else if origsec=88. Compute sec=70. Else if origsec=75. Compute sec=72. Else if origsec=87. Compute sec=73. Else if origsec=86. Compute sec=74. Else if origsec=85. Compute sec=75. Else if origsec=84. Compute sec=76. Else if origsec=83. Compute sec=77. Else if origsec=98. Compute sec=78. Else if origsec=93. Compute sec=81. Else if origsec=94. Compute sec=82. Else if origsec=95. Compute sec=83. Else if origsec=92. Compute sec=84. Else if origsec=90. Compute sec=85. Else if origsec=91. Compute sec=86. Else if origsec=97. Compute sec=87. Else if origsec=96. Compute sec=88. Else if origsec=49. Compute sec=91. Else if origsec=9. Compute sec=93. Else if origsec=59. Compute sec=94. Else if origsec=39. Compute sec=95. Else if origsec=29. Compute sec=96. Else if origsec=69. Compute sec=97. Else if origsec=79 or origsec=89. Compute sec=98. Else if origsec=99. Compute sec=0. End if. freq sec. temp. select if sec<15. cro origsec by sec. temp. select if sec>14 and sec<28. cro origsec by sec. temp. select if sec>27 and sec<42. cro origsec by sec. temp. select if sec>41 and sec<56. cro origsec by sec. temp. select if sec>55 and sec<70. cro origsec by sec. temp. select if sec>69 and sec<84. cro origsec by sec. temp. select if sec>83. cro origsec by sec. sort cases by pid. temp. select if epnum=1. desc daywgt demowgt. *Descriptive Statistics * * N Min Max Mean *DAYWGT WT DAY OF WEEK 2021 .91 1.08 1.0016 *DEMOWGT WT DEMOGRAPHIC 2021 .00 .09 .0050 *Valid N (listwise) 2021. temp. select if epnum>1. desc daywgt demowgt. *Descriptive Statistics * * N Min Max Mean *DAYWGT WT DAY OF WEEK 53650 9.99 9.99 9.99 *DEMOWGT WT DEMOGRAPHIC 53650 .99 .99 9.99 *Valid N (listwise) 53650. temp. select if demowgt=0. freq survey. *SURVEY survey period * * Freq % Valid % *0 65-66 Szalai 461 38.4 38.4 *1 65-66 national 739 61.6 61.6 *Total 1200 100.0 100.0. temp. select if demowgt>0 and demowgt~=0.99. freq survey. *SURVEY survey period * * Freq % Valid % *0 65-66 Szalai 298 36.3 36.3 *1 65-66 national 523 63.7 63.7 *Total 821 100.0 100.0. *things to note about the original weights - *1) the original weights only are attached to * the first episode; *2) day weights calculated for all cases *3) demographic weights calculated only for * 821 cases - slightly more than the * number of people in the Jackson sample, * though 1/3 of the weights apply to the * Jackson sample and 2/3 to the national * sample. Slightly less than the number of * cases from the national sample have 0 * weights. Do if epnum=1. compute d= daywgt. Else. compute d=0. End if. Do if epnum=1. compute dem= demowgt. Else. compute dem=0. End if. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\usa65wght.sav' /BREAK=pid /daywgt = MAX(d) /demowgt = MAX(dem). *note - no missing main activity time in this file. *we have chosen to impute codes to fill missing gaps *but not to impute codes to replace ativities recorded *in the diaries. For this file, the only potential *imputation relates to seconday imputed travel (code 90) *and imputed eating where no main activity eating but *main activity food preparation or setting table reported. *first test for the need for such imputation - that is *cases or main activity not travel but location is *travelling. compute test=0. If main<90 and sec=0 and eloc=8 test=1. freq test. *there are 301 such episodes. These are coded as imputed *secondary travel. If main<90 and sec=0 and eloc=8 sec=90. freq sec. compute eatdr=0. If main=8 or main=9 or main=56 or sec=8 or sec=9 or sec=56 eatdr=time. *check for missing eating time but recorded set table or food prep. AGGREGATE /OUTFILE=* mode=addvariables /BREAK=id /anyeat = SUM(eatdr) /maxep = MAX(epnum). freq anyeat. temp. select if anyeat=0. freq maxep main. *no really low episode diaries with missing eating. Do if anyeat=0 and (main=20 or main=21) and sec=0. compute sec=2. End if. freq sec. temp. select if mtrav=-7. freq main sec. Do if mtrav=-7 and (main>89 or sec>89). compute mtrav=5. End if. freq mtrav. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.SAV' /KEEP survey wave hhid pid diaryday cday month year time clockst start2 end2 epnum main sec inout eloc mtrav alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp. Get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.SAV'. 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. compute eatdr=0. compute sleep=0. compute perscare=0. compute mstrav=0. compute anycare=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 or main=9 or main=20 or main=21 or main=56 or sec=8 or sec=9 or sec=56 or sec=20 or sec=21 or sec=2 eatdr=time. If main=3 or main=4 or main=5 or main=13 or main=78 or sec=3 or sec=5 or sec=13 or sec=78 sleep=time. If main=1 or main=2 or main=6 or main=7 or main=28 or main=29 or sec=1 or sec=6 or sec=7 or sec=28 or sec=29 perscare=time. If (main>59 and main<70) or (main>89 and main<99) or sec=60 or (sec>59 and sec<70) or (sec>89 and sec<99) mstrav=time. If (main>32 and main<41) or (sec>32 and sec<41) anycare=1. 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 shoprof=1 or otherp=1 or (wellknw=1 and clsfam=0) 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) or sec=96) b=time. End repeat. apply dictionary from 'C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\History of harmonisation - Diary\schema\schema2.sav'. desc t0pcare t1paidw t2ed t3unpaid t4acvol t5outhm t6exerc t7inhm t8media t9trav tmiss eatdr sleep perscare mstrav outside inside inveh locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk. compute t1dig = SUM(t0pcare to tmiss). compute t2dig = SUM (tmain1 to tmain98). compute t2dig = t2dig + tmiss. var lab anycare marker of diarist who performed care. val lab anycare 0 no care recorded 1 child or adult care recorded. freq anycare. temp. select if anycare=1. cro main by sec. *set all variable codes which could not be *constructed to -9 for missing. *note that tmain43 and tsc43 are set to -9 because while the original *code book lists this category of activity, no time is actually recorded *in the activity in the data. recode tmain2 tsc2 tmain4 tsc4 tmain15 tsc15 tmain43 tsc43 tmain44 tsc44 tmain45 tsc45 tmain58 tsc58 tmain63 tsc63 tmain64 tsc64 tmain71 tsc71 tmain89 tsc89 tmain90 tmain92 tsc92 (0=-9). execute. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfsum.sav' /BREAK=survey wave hhid 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 = MAX(tmain2) /tmain3 = SUM(tmain3) /tmain4 = MAX(tmain4) /tmain5 = SUM(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 = MAX(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 = SUM(tmain46) /tmain48 = SUM(tmain48) /tmain49 = SUM(tmain49) /tmain50 = SUM(tmain50) /tmain51 = SUM(tmain51) /tmain52 = SUM(tmain52) /tmain53 = SUM(tmain53) /tmain54 = SUM(tmain54) /tmain55 = SUM(tmain55) /tmain56 = SUM(tmain56) /tmain57 = SUM(tmain57) /tmain58 = MAX(tmain58) /tmain60 = SUM(tmain60) /tmain62 = SUM(tmain62) /tmain63 = MAX(tmain63) /tmain64 = MAX(tmain64) /tmain65 = SUM(tmain65) /tmain66 = SUM(tmain66) /tmain67 = SUM(tmain67) /tmain68 = SUM(tmain68) /tmain70 = SUM(tmain70) /tmain71 = MAX(tmain71) /tmain72 = SUM(tmain72) /tmain73 = SUM(tmain73) /tmain74 = SUM(tmain74) /tmain75 = SUM(tmain75) /tmain76 = SUM(tmain76) /tmain77 = SUM(tmain77) /tmain78 = SUM(tmain78) /tmain81 = SUM(tmain81) /tmain82 = SUM(tmain82) /tmain83 = SUM(tmain83) /tmain84 = SUM(tmain84) /tmain85 = SUM(tmain85) /tmain86 = SUM(tmain86) /tmain87 = SUM(tmain87) /tmain88 = SUM(tmain88) /tmain89 = MAX(tmain89) /tmain90 = MAX(tmain90) /tmain91 = SUM(tmain91) /tmain92 = MAX(tmain92) /tmain93 = SUM(tmain93) /tmain94 = SUM(tmain94) /tmain95 = SUM(tmain95) /tmain96 = SUM(tmain96) /tmain97 = SUM(tmain97) /tmain98 = SUM(tmain98) /tsc1 = SUM(tsc1) /tsc2 = MAX(tsc2) /tsc3 = SUM(tsc3) /tsc4 = MAX(tsc4) /tsc5 = SUM(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= MAX(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= SUM(tsc46) /tsc48= SUM(tsc48) /tsc49= SUM(tsc49) /tsc50= SUM(tsc50) /tsc51= SUM(tsc51) /tsc52= SUM(tsc52) /tsc53= SUM(tsc53) /tsc54= SUM(tsc54) /tsc55= SUM(tsc55) /tsc56= SUM(tsc56) /tsc57= SUM(tsc57) /tsc58= MAX(tsc58) /tsc60= SUM(tsc60) /tsc62= SUM(tsc62) /tsc63= MAX(tsc63) /tsc64= MAX(tsc64) /tsc65= SUM(tsc65) /tsc66= SUM(tsc66) /tsc67= SUM(tsc67) /tsc68= SUM(tsc68) /tsc70= SUM(tsc70) /tsc71= MAX(tsc71) /tsc72= SUM(tsc72) /tsc73= SUM(tsc73) /tsc74= SUM(tsc74) /tsc75= SUM(tsc75) /tsc76= SUM(tsc76) /tsc77= SUM(tsc77) /tsc78= SUM(tsc78) /tsc81= SUM(tsc81) /tsc82= SUM(tsc82) /tsc83= SUM(tsc83) /tsc84= SUM(tsc84) /tsc85= SUM(tsc85) /tsc86= SUM(tsc86) /tsc87= SUM(tsc87) /tsc88= SUM(tsc88) /tsc89= MAX(tsc89) /tsc90= SUM(tsc90) /tsc91= SUM(tsc91) /tsc92= MAX(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) /eatdr = SUM(eatdr) /sleep = SUM(sleep) /perscare=SUM(perscare) /mstrav= SUM(mstrav) /t1dig = SUM(t1dig) /t2dig = SUM(t2dig) /anycare = MAX(anycare). get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\Harmonised files\Questionnaire\USA65_66quest.sav' /keep survey wave hhid age sex empstat. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\USA65dembasic.sav'. Get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfsum.sav'. *check that variables sum to 1440 in aggregated file. freq t1dig t2dig tottime. formats t0pcare to t2dig (f8.0). execute. compute muchmiss=0. If tmiss>90 muchmiss=1. var lab muchmiss missing more than 90 minutes. val lab muchmiss 0 no more than 90 minutes missing 1 more than 90 minutes missing. freq muchmiss. compute lowep=0. If numep<7 lowep=1. var lab lowep "<7 episodes". cro lowep by numep. freq lowep. compute misbasic=0. If mstrav=0 misbasic=misbasic+1. If eatdr=0 misbasic=misbasic+1. If sleep=0 misbasic=misbasic+1. If perscare=0 misbasic=misbasic+1. var lab misbasic number basic activites not recorded. freq misbasic. cro misbasic by anycare. temp. select if anycare=1 and misbasic=2. freq numep. *9 people missing 2 basic activities but performed care. compute caremflg=0. if anycare=1 and misbasic=2 caremflg=1. cro caremflg by anycare by misbasic. temp. select if anycare=0 and misbasic=2. freq numep. compute lowqual=0. If muchmiss=1 or lowep=1 or (misbasic>1 and caremflg=0 and numep<12) or (misbasic>2 and caremflg=1) lowqual=1. freq lowqual. temp. select if lowqual=1. cro misbasic by numep. match files files=* files='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\USA65dembasic.sav' /by survey wave hhid. execute. compute baddem=0. compute baddem2=0. var lab baddem2 "age, sex or empstat missing (0 weighed)". val lab baddem2 0 no 1 yes. If age<0 or sex<0 or diaryday<0 baddem=1. If age<0 or sex<0 or empstat<0 or diaryday<0 baddem2=1. compute origwght = 0. compute owghtflg = 1. compute xtimewt=0. compute infltwt=0. compute recwght = 0. apply dictionary from 'C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\History of harmonisation - Diary\schema\schema2.sav'. cro lowqual by muchmiss lowep misbasic. freq lowqual baddem baddem2 owghtflg. cro lowqual by baddem baddem2. freq eatdr sleep perscare mstrav. *9 no eating or drinking *1 no sleep or rest *37 no personal care *122 no travel. *as original weights - tested further below, did not apply *to many cases, we construct post-hoc weights here. ******************************************* * NOTE: * * CPS March Demographic proportions 1965 * * Men Women * * 18 to 24 8.1 8.9 * * 25 to 34 10.0 11.1 * * 35 to 44 11.3 12.4 * * 45 to 54 10.5 11.4 * * 55 to 64 7.7 8.6 * * 65 plus excl excl * * __________________ * * all 46.7 53.3 * *******************************************. freq age sex. *no missing cases for sex; 27 missing cases for age. recode age (18 thru 24=1)(25 thru 34=2)(35 thru 44=3) (45 thru 54=4)(55 thru hi=5)(else=6) into agegp. If lowqual=1 or diaryday=-8 agegp=6. *the 27 cases aged over 64 included with the category of age 64. *note also that there is one woman aged 25-34 whose diary *day is unknown - she is included in the post-hoc population *weight but later excluded in the combined day and sample *weight. compute agesexgp=agegp+ 10*(sex-1). val lab agesexgp 1 "men 18 thru 24" 2 "men 25 thru 34" 3 "men 35 thru 44" 4 "men 45 thru 54" 5 "men 55 thru 64" 6 "men age missing or bad diary" 11 "women 18 thru 24" 12 "women 25 thru 34" 13 "women 35 thru 44" 14 "women 45 thru 54" 15 "women 55 thru 64" 16 "women age missing or bad diary". missing values agesexgp (6, 16). fre agesexgp. ******************************************************* * NOTE: * * * * Value Label Frequency Percent | CPS * * men 18 thru 24 111 5.6 | 8.1 * * men 25 thru 34 221 11.1 | 10.0 * * men 35 thru 44 213 10.7 | 11.3 * * men 45 thru 54 209 10.5 | 10.5 * * men 55 thru 64 142 7.1 | 7.7 * * women 18 thru 24 175 8.8 | 8.9 * * women 25 thru 34 266 13.4 | 11.1 * * women 35 thru 44 273 13.7 | 12.4 * * women 45 thru 54 226 11.4 | 11.4 * * women 55 thru 64 155 7.7 | 8.6 * * men miss age/bad diary 12 Missing | * * women miss age/bad diary 18 Missing | * * ------- ------- | * * 2021 100.0 * * Valid cases 1991 Missing cases 30 * *******************************************************. if agesexgp eq 1 origwght =( 8.1/ 5.6). if agesexgp eq 2 origwght =(10.0/11.1). if agesexgp eq 3 origwght =(11.3/10.7). if agesexgp eq 4 origwght =(10.5/10.5). if agesexgp eq 5 origwght =( 7.7/ 7.1). if agesexgp eq 11 origwght =( 8.9/ 8.8). if agesexgp eq 12 origwght =(11.1/13.4). if agesexgp eq 13 origwght =(12.4/13.7). if agesexgp eq 14 origwght =(11.4/11.4). if agesexgp eq 15 origwght =( 8.6/ 7.7). temp. select if origwght>0. des origwght. ************************************************** * Mean Std Dev Minimum Maximum N * *ORIGWGHT 1.00 .14 .828 1.446 1991 * **************************************************. cro agesexgp by diaryday /cells = row. sort cases by agesexgp diaryday. compute agesexwt=origwght. aggregate outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\group.sav' /break=agesexgp /grouptot=sum(agesexwt). aggregate outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\day.sav' /break= agesexgp diaryday /daytot=sum(agesexwt) /dayn=nu. execute. match files file=* /table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\group.sav' /by agesexgp. execute. match files file=* /table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\day.sav' /by agesexgp diaryday. execute. compute exptot=(grouptot/7). Do if lowqual=0 and baddem=0. compute recwght=(exptot/daytot)/(dayn/daytot). compute xtimewt=(exptot/daytot)/(dayn/daytot). End if. compute recwght=recwght*2021/1991. compute xtimewt=xtimewt*2021/1991. des recwght xtimewt. weight by recwght. fre diaryday. cro agesexgp by diaryday /cell=row. fre agesexgp. weight off. *the above confirms that the day distribution is equal for *each age and sex group and also that the population *distribution reflects the CPS distribution. compute agegp2=-8. if sex=1 and (age>16 and age<30) agegp2=0. if sex=1 and (age>29 and age<40) agegp2=1. if sex=1 and (age>39 and age<50) agegp2=2. if sex=1 and (age>49 and age<60) agegp2=3. if sex=1 and age>59 agegp2=4. if sex=2 and (age>16 and age<30) agegp2=5. if sex=2 and (age>29 and age<40) agegp2=6. if sex=2 and (age>39 and age<50) agegp2=7. if sex=2 and (age>49 and age<60) agegp2=8. if sex=2 and age>59 agegp2=9. val lab agegp2 -8 missing 0 men aged 19-29 1 men aged 30-39 2 men aged 40-49 3 men aged 50-59 4 "men aged 60+" 5 women aged 19-29 6 women aged 30-39 7 women aged 40-49 8 women aged 50-59 9 "women aged 60+". weight by recwght. freq agegp2. weight off. ***************************************** * CPS age distributions * * population 18-65 * * diary * * MEN frequency % frequency * * age 18-29 5345 26.8 285 * * age 30-39 4446 22.3 192 * * age 40-49 4684 23.5 238 * * age 50-59 3789 19.0 171 * * age 60-65 1657 8.3 76 * * total 19921 * * * * WOMEN frequency % * * age 18-29 5874 26.8 290 * * age 30-39 4778 21.8 229 * * age 40-49 5194 23.7 253 * * age 50-59 4098 18.7 210 * * age 60-65 1973 9.0 78 * * total 21917 * * * * total 41838 2021 * *****************************************. *produce a weight which inflates to the CPS *population size. Do if agegp2=0. compute infltwt=recwght*(5345/285). Else if agegp2=1. compute infltwt=recwght*(4446/192). Else if agegp2=2. compute infltwt=recwght*(4684/238). Else if agegp2=3. compute infltwt=recwght*(3789/171). Else if agegp2=4. compute infltwt=recwght*(1657/76). Else if agegp2=5. compute infltwt=recwght*(5874/290). Else if agegp2=6. compute infltwt=recwght*(4778/229). Else if agegp2=7. compute infltwt=recwght*(5194/253). Else if agegp2=8. compute infltwt=recwght*(4098/210). Else if agegp2=9. compute infltwt=recwght*(1973/78). End if. execute. weight by infltwt. freq agegp2. weight off. sort cases by survey wave hhid pid. Save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfsum.sav' /drop eatdr sleep perscare mstrav muchmiss lowep misbasic t1dig t2dig age sex empstat baddem2 agegp agesexgp agesexwt grouptot daytot dayn exptot agegp2. Save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\addlow.sav' /keep survey wave hhid pid lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. Get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.SAV'. rename variables (start2 end2 =start end). sort cases by survey wave hhid pid. match files files=* table='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\addlow.sav' /by survey wave hhid pid. execute. apply dictionary from 'C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\History of harmonisation - Diary\schema\schema1.sav'. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.SAV'. *check prevalence of secondary activities. get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.sav'. compute anysec=0. compute sectime=0. compute secep=0. compute seccc=0. compute seccctmain=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 seccctmain= time. compute secccep=1. End if. freq anysec secep seccc secccep. desc sectime seccctmain. AGGREGATE /OUTFILE='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\aggr.sav' /BREAK=hhid /anysec 'any secondary activity' = MAX(anysec) /seccc 'any secondary childcare' = MAX(seccc) /sectime 'secodary activity time' = SUM(sectime) /seccctmain 'secodary childcare time' = SUM(seccctmain) /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:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\aggr.sav'. compute propsec= secep/epnum*100. compute pcc= secccep/epnum*100. select if lowqual=0. freq anysec seccc. desc sectime seccctmain propsec pcc. temp. select if seccc=1. desc seccctmain pcc. *test all variables and value labelled and variables appropriate. Get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfep.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 baddem caremflg 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. save outfile='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\Harmonised files\Diary\diary1965\USA1965hfep.SAV'. get file='C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\1965\USA1965hfsum.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 lowqual baddem caremflg origwght xtimewt infltwt recwght. freq survey wave diaryday cday month year tottime numep lowqual baddem. temp. select if recwght~=0. freq diaryday. weight by recwght. freq diaryday. weight off. temp. select if recwght=0. cro lowqual by baddem. save outfile= 'C:\Documents and Settings\Kimberly Fisher\My Documents\Kimberly\time\ATUS\AHTUS final files\Harmonised files\Diary\diary1965\USA1965hfsum.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 inside inveh locunk athome atwrksc elsewhr lunk walone wchild wsppart wclsfam wother withunk lowqual baddem caremflg origwght owghtflg xtimewt infltwt recwght. *check out quality of original survey weights. get file='c:\kimberly\time\ATUS\1965\USA1965hfep.sav'. sort cases by pid. match files files=* table='c:\kimberly\time\ATUS\1965\usa65wght.sav' /by pid. execute. freq diaryday. weight by daywgt. freq diaryday. weight by demowgt. freq diaryday. *the original weights both do not account for 2/3rds of cases *and do not balance the days. Consequently we calculated *separate weights for the ATUS for this survey.