*************************************************** **Syntax producing the 5.53, 5.8 and 6.0 version ** **of the USA 1975-76 ** **created by Dr. Kimberly Fisher and Professor ** **Jonathan Gershuny, ISER, University of Essex, ** **Colchester CO4 3SQ United Kingdom 08/02/2006 ** **updated 21 July 2010, amended 24 January 2013 ** ***************************************************. *************************************************** **Note that previous versions of the MTUS made ** **use only of the first wave of this longitudinal** **data set. This syntax creates an MTUS file ** **using all four waves of data ** ***************************************************. ******************************************************* **Note also that the full original data is saved in a** **complex wide file. This study sampled one person ** **per household, but where the sampled person had a ** **spouse or co-habiting partner, also collected less ** **detailed questionnaire information and a less- ** **detailed diary from the spouse or partner. The wide** **file includes one row case for each respondent and ** **one row case for each spouse. The columns cover the** **diaries of the person for whom each row was created** **but also include additional columns for the diaries** **of the partner if present. Some data from main ** **respondent diaries not included in the spouse ** **diaries was improperly transposed to the diary ** **columns of the spouses on the spouse rows. We ** **retain the information actually from the spouse ** **diaries (and we have checked that the other ** **information corresponds with the main respondent ** **diaries as part of a separate project creating ** **heritage time use files for the USA (Glazier ** **Foundation/Yale University). This project also ** **corrected some data entry errors in the original ** **file. The syntax creatingis the USA heritage files ** **is available for review. ** *******************************************************. ********************************************************** *extract additional MTUS variables from the original file* **********************************************************. *create extra MTUS household variables. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v2627 v2677 v2678 v2679 v2680 v3591 v3592 v3627 v2775 v2776 v6823. recode v2627 to v6823 (sysmis=-1). compute computer=-9. compute hldid = v2. select if v2<2000. desc hldid. freq v2627 v2677 v2678 v2679 v2680 v3591 v3592 v3627 v2775 v2776 v6823. cro v2677 by v2678. cro v3591 by v3592 v3627. cro v2775 by v2776. Do if v2627=2 or v2680>1. compute vehicle=4. Else if v2627=1 or v2680=1 or v3591=1 or v3627>0 or v2775=1 or v6823=1. compute vehicle=3. Else if v2677=1. compute vehicle=2. Else if v2677=0. compute vehicle=0. Else. compute vehicle=-8. End if. cro vehicle by v2627 v2677 v6823. freq vehicle. *25% missing, see if any information activity codes could help redo this. sort cases by hldid. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\hhadd.sav' /keep hldid computer vehicle. *create the extra individual variables for the main respondent. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v7968 v6867 v6870 v6879 v7763 v7766 v7769 v7770 v3938 v2550 v2552 v2556 v2557 v2602 v2603 v222 v6854 v60 v89 v124 v136 v1190 v6781 v6782 v414. recode v6867 to v6782 (sysmis=-9). compute hldid=v2. compute persid=v2. *remove respondent diaries doubled on spouse lines. select if v7968=1. execute. *make citizen. freq v6867 v6870 v6879 v7763 v7766 v7769 v7770. cro v6867 by v6870 v6879 v7763. Do if v6867=1 or (v6867<0 and v7763=1). compute citizen=1. Else if v6867=5. compute citizen=0. Else. compute citizen=-8. End if. freq citizen. cro citizen by v6867. *make rushed. freq v1190 v6781 v6782. cro v6781 by v1190 v6782. recode v6781 (-9=-8) (1=2) (3=1) (5=0) into rushed. *3 people who did not answer rushed say they seldom have *time on their hands, and more likely not to feel never rushed. if rushed=-8 and v6782>1 rushed=1. cro rushed by v6781 v3938. freq rushed. *make health. freq v6854 v2550. cro v6854 by v2550. temp. select if v2550=-9 and (v6854=0 or v6854=1). freq v3938 v2552 v60 v89 v124 v136. recode v2550 (5=0) (4=1) (2=2) (1=3) (-9=-8) into health. execute. Do if health=-8 and (v6854=0 or v6854=1). compute health=0. Else if health=-8 and v6854=10. compute health=3. Else if health=-8 and v6854>0. compute health=2. End if. freq health. cro health by v6854 v2550 v2552 v60 v89 v124 v136. temp. select if health=-8. cro v60 by v124. if health=-8 and v60=1 health=1. if health=-8 and v60=5 health=2. freq health. *make carer and disab. freq v2552 v2556 v2557 v2602 v2603 v222 v60 v124 v136. cro v2602 by v2556 v2557. cro v2603 by v2602. compute carer=0. if (v2556>3 or v2557>3) and v2602=1 carer=1. freq carer. cro v60 v136 by v2552. compute test=0. if v136>0 and v2552=-9 test=1. if v136>0 and v2552=1 test=2. if v136>0 and v2552=5 test=3. means v414 by test /cells = min max median mean. compute disab=0. If v136>0 and v414<55 disab=1. If v136>0 and v414>54 and v2552=1 disab=1. freq disab. cro disab by health. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\rindadd.sav' /keep hldid persid citizen rushed health disab carer. *now create the extra individual variables for the spouse. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v1183 v1687 v7968 v6867 v7763 v7766 v7770 v1190 v1183 v1687 v7968 v414 v2556 v2557 v222 v2550. recode v6867 to v2550 (sysmis=-9). rename variables (v2 v1183=hldid persid). recode persid v1687 (sysmis=-8). Do if persid=-8. compute persid= v1687. End if. desc persid. select if v7968=1 and persid>0. desc persid. *make citizen. freq v7763 v7766 v7770 v6867. cro v7763 by v7766 v7770 v6867. Do if v7763=1 or (v7763<0 and v6867=1). compute citizen=1. Else if v7763=5 or (v7763<0 and v6867=5). compute citizen=0. Else. compute citizen=-8. End if. freq citizen. cro citizen by v7763. *make rushed. freq v1190. recode v1190 (-9=-8) (1=2) (3=1) (5=0) into rushed. cro rushed by v1190. freq rushed. *make health. freq v2556. recode v2556 (5=0) (4=1) (2=2) (1=3) (-9=-8) into health. cro health by v2556. *make carer and disab. freq v2557 v222 v2550. compute carer=0. if (v2550>4 or v2557>4) carer=1. freq carer. compute disab=0. If v222>0 and v414<55 disab=1. If v222>0 and v414>54 and (v2556=4 or v2556=5) disab=1. freq disab. cro disab by health. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\sindadd.sav' /keep hldid persid citizen rushed health disab carer. add files files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\rindadd.sav' files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\sindadd.sav'. sort cases by hldid persid. freq carer. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\indadd.sav'. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v19 v20 v21 v22 v23 v24. compute hldid = v2. compute persid=v2. select if v2<2000. recode v19 v20 v21 v22 v23 v24 (sysmis=-8). recode v19 (8=0) (else=copy) into lifesat. var lab lifesat how do you feel about your life as a whole. recode v20 (8=0) (else=copy) into hhincsat. var lab hhincsat how do you feel about your family income. recode v21 (8=0) (else=copy) into stlivsat. var lab stlivsat how do you feel about your standard of living. recode v22 (8=0) (else=copy) into getahead. var lab getahead feel about whether achieved getting ahead. recode v23 (8=0) (else=copy) into jobsat. var lab jobsat how do you feel about your job. execute. val lab lifesat hhincsat stlivsat getahead jobsat -8 missing -7 not relevant or spouse not asked 0 no feelings at all 1 terrible 2 unhappy 3 mostly dissatisfied 4 equally satisfied and dissatisfied 5 mostly satisfied 6 pleased 7 delighted. rename variables (v24=incomfrt). var lab incomfrt is family income enough to live comfortably. val lab incomfrt -8 missing -7 not relevant or spouse not asked 1 very comfortable 2 comfortable 3 no middle case collected, paritipants had to chose an end of scale 4 not too comfortable 5 not at all comfortable. freq incomfrt lifesat hhincsat stlivsat getahead jobsat. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot1.sav' /keep hldid persid lifesat hhincsat stlivsat getahead jobsat incomfrt. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot1.sav'. *create respondent attitude variables. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v2837 v2838 v2839 v2840 v2841 v2842 v2843 v2844 v2845 v2846 v2847 v2848 v2849 v2850 v2851 v2852 v2853 v2854 v2855 v2856 v2857 v2858. compute hldid = v2. compute persid=v2. select if v2<2000. freq v2837 v2838 v2839 v2840 v2841 v2842 v2843 v2844 v2845 v2846 v2847 v2848 v2849 v2850 v2851 v2852 v2853 v2854 v2855 v2856 v2857 v2858. recode v2837 (sysmis=-8) (else=copy) into rate1. recode v2838 (sysmis=-8) (else=copy) into rate2. recode v2839 (sysmis=-8) (else=copy) into rate3. recode v2840 (sysmis=-8) (else=copy) into rate4. recode v2841 (sysmis=-8) (else=copy) into rate5. recode v2842 (sysmis=-8) (else=copy) into rate6. recode v2843 (sysmis=-8) (else=copy) into rate7. recode v2844 (sysmis=-8) (else=copy) into rate8. recode v2845 (sysmis=-8) (else=copy) into rate9. recode v2846 (sysmis=-8) (else=copy) into rate10. recode v2847 (sysmis=-8) (else=copy) into rate11. recode v2848 (sysmis=-8) (else=copy) into rate12. recode v2849 (sysmis=-8) (else=copy) into rate13. recode v2850 (sysmis=-8) (else=copy) into rate14. recode v2851 (sysmis=-8) (else=copy) into rate15. recode v2852 (sysmis=-8) (else=copy) into rate16. recode v2853 (sysmis=-8) (else=copy) into rate17. recode v2854 (sysmis=-8) (else=copy) into rate18. recode v2855 (sysmis=-8) (else=copy) into rate19. recode v2856 (sysmis=-8) (else=copy) into rate20. recode v2857 (sysmis=-8) (else=copy) into rate21. recode v2858 (sysmis=-8) (else=copy) into rate22. var lab rate1 how much enjoy cleaning house. var lab rate2 how much enjoy cooking. var lab rate3 how much enjoy repairs around the house. var lab rate4 how much enjoy making things for household. var lab rate5 how much enjoy gardening. var lab rate6 how much enjoy grocery shopping. var lab rate7 how much enjoy other shopping. var lab rate8 how much enjoy your job. var lab rate9 how much enjoy caring for your children. var lab rate10 how much enjoy playing with your children. var lab rate11 how much enjoy talking with your children. var lab rate12 how much enjoy taking children places. var lab rate13 how much enjoy talking with friends. var lab rate14 how much enjoy entertaining at home. var lab rate15 how much enjoy going to church. var lab rate16 how much enjoy volunteer for organisation. var lab rate17 how much enjoy watching TV. var lab rate18 how much enjoy reading papers. var lab rate19 how much enjoy reading books or magazines. var lab rate20 how much enjoy playing sports or active games. var lab rate21 how much enjoy going to movies, sports events. var lab rate22 how much enjoy trips or outings. val lab rate1 to rate22 -8 missing 0 dislike a great deal 1 dislike more intensely 2 dislike 3 dislike slightly 4 dislike very slightly 5 neither dislike nor enjoy 6 enjoy very slightly 7 enjoy slightly 8 enjoy 9 enjoy more intensely 10 enjoy a great deal. freq rate1 to rate22. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot2.sav' /keep hldid persid rate1 rate2 rate3 rate4 rate5 rate6 rate7 rate8 rate9 rate10 rate11 rate12 rate13 rate14 rate15 rate16 rate17 rate18 rate19 rate20 rate21 rate22. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot2.sav'. *create spouse attitude variables. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v1183 v1687 v7968 v5634 v5635 v5636 v5637 v5638 v5639 v5640 v5641 v5642 v5643 v5644 v5645 v5646 v5647 v5648 v5649 v5650 v5651 v5652 v5653 v5654 v5655. recode v1687 to v5655 (sysmis=-8). recode v5634 to v5655 (96=-8). select if v2<2000. rename variables (v2 v1183=hldid persid). recode persid v1687 (sysmis=-8). Do if persid=-8. compute persid= v1687. End if. desc persid. select if v7968=1 and persid>0. desc persid. recode v5634 (sysmis=-8) (else=copy) into rate1. recode v5635 (sysmis=-8) (else=copy) into rate2. recode v5636 (sysmis=-8) (else=copy) into rate3. recode v5637 (sysmis=-8) (else=copy) into rate4. recode v5638 (sysmis=-8) (else=copy) into rate5. recode v5639 (sysmis=-8) (else=copy) into rate6. recode v5640 (sysmis=-8) (else=copy) into rate7. recode v5641 (sysmis=-8) (else=copy) into rate8. recode v5642 (sysmis=-8) (else=copy) into rate9. recode v5643 (sysmis=-8) (else=copy) into rate10. recode v5644 (sysmis=-8) (else=copy) into rate11. recode v5645 (sysmis=-8) (else=copy) into rate12. recode v5646 (sysmis=-8) (else=copy) into rate13. recode v5647 (sysmis=-8) (else=copy) into rate14. recode v5648 (sysmis=-8) (else=copy) into rate15. recode v5649 (sysmis=-8) (else=copy) into rate16. recode v5650 (sysmis=-8) (else=copy) into rate17. recode v5651 (sysmis=-8) (else=copy) into rate18. recode v5652 (sysmis=-8) (else=copy) into rate19. recode v5653 (sysmis=-8) (else=copy) into rate20. recode v5654 (sysmis=-8) (else=copy) into rate21. recode v5655 (sysmis=-8) (else=copy) into rate22. var lab rate1 how much enjoy cleaning house. var lab rate2 how much enjoy cooking. var lab rate3 how much enjoy repairs around the house. var lab rate4 how much enjoy making things for household. var lab rate5 how much enjoy gardening. var lab rate6 how much enjoy grocery shopping. var lab rate7 how much enjoy other shopping. var lab rate8 how much enjoy your job. var lab rate9 how much enjoy caring for your children. var lab rate10 how much enjoy playing with your children. var lab rate11 how much enjoy talking with your children. var lab rate12 how much enjoy taking children places. var lab rate13 how much enjoy talking with friends. var lab rate14 how much enjoy entertaining at home. var lab rate15 how much enjoy going to church. var lab rate16 how much enjoy volunteer for organisation. var lab rate17 how much enjoy watching TV. var lab rate18 how much enjoy reading papers. var lab rate19 how much enjoy reading books or magazines. var lab rate20 how much enjoy playing sports or active games. var lab rate21 how much enjoy going to movies, sports events. var lab rate22 how much enjoy trips or outings. val lab rate1 to rate22 -8 missing 0 dislike a great deal 1 dislike more intensely 2 dislike 3 dislike slightly 4 dislike very slightly 5 neither dislike nor enjoy 6 enjoy very slightly 7 enjoy slightly 8 enjoy 9 enjoy more intensely 10 enjoy a great deal. freq rate1 to rate22. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot3.sav' /keep hldid persid rate1 rate2 rate3 rate4 rate5 rate6 rate7 rate8 rate9 rate10 rate11 rate12 rate13 rate14 rate15 rate16 rate17 rate18 rate19 rate20 rate21 rate22. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot3.sav'. GET FILE='C:\Users\Kimberly Fisher\Documents\MTUS-archive\USA\1975-76\new1975.sav' /keep v2 v6005 v6801 v6802 v6844 v6845 v6846 v6847 v6848 v6849 v6850 v6851 v6852 v6853 v6854 v6855 v6856 v6857. compute hldid = v2. compute persid=v2. select if v2<2000. recode v6005 (sysmis, 8=-8) (else=copy) into hapcoup. var lab hapcoup how happy is your marriage. val lab hapcoup -8 missing -7 not in a couple or spouse diarist not asked question 1 very happy 2 a little happier than average 3 about average 4 not very happy couple. freq hapcoup. recode v6801 (1=2) (3=1) (5=0) (else=-8) into frtmsat. var lab frtmsat how satisfied with free time. val lab frtmsat -8 missing -7 not relevant or spouse not asked 0 just somewhat satisfied 1 very satisfied 2 completely satisfied. freq frtmsat. cro frtmsat by v6801. recode v6802 (1=3) (3=2) (5=1) (7=0) (else=-8) into frtmwst. var lab frtmwst how much free time wasted. val lab frtmwst -8 missing -7 not relevant or spouse not asked 0 none 1 hardly any of it 2 a little of it 3 some of it. freq frtmwst. cro frtmwst by v6802. cro frtmsat by frtmwst. recode v6844 (sysmis=-8) (else=copy) into sat1. recode v6845 (sysmis=-8) (else=copy) into sat2. recode v6846 (sysmis=-8) (else=copy) into sat3. recode v6847 (sysmis=-8) (else=copy) into sat4. recode v6848 (sysmis=-8) (else=copy) into sat5. recode v6849 (sysmis=-8) (else=copy) into sat6. recode v6850 (sysmis=-8) (else=copy) into sat7. recode v6851 (sysmis=-8) (else=copy) into sat8. recode v6852 (sysmis=-8) (else=copy) into sat9. recode v6853 (sysmis=-8) (else=copy) into sat10. recode v6854 (sysmis=-8) (else=copy) into sat11. var lab sat1 how clean your house is. var lab sat2 how good your main meal usually is. var lab sat3 how clean your laundry is. var lab sat4 the amount of clean clothing available. var lab sat5 the amount of food available in the house. var lab sat6 amount of time you spend with your children. var lab sat7 amount of time whole family spends together. var lab sat8 how well children are doing in life. var lab sat9 amount of free time when you can do what you want to do. var lab sat10 energy you have to do what you want to do. var lab sat11 energy and health to do what you want to do. val lab sat1 to sat11 -8 missing -7 not relevant or spouse not asked 0 completely dissatisfied 1 highly dissatisfied 2 very dissatisfied 3 dissatisfied 4 slightly dissatisfied 5 neither satisfied nor dissatisfied 6 slightly satisfied 7 satisfied 8 very satisfied 9 highly satisfied 10 completely satisfied. freq sat1 to sat11. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot4.sav' /keep hldid persid hapcoup frtmsat frtmwst sat1 sat2 sat3 sat4 sat5 sat6 sat7 sat8 sat9 sat10 sat11. add files files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot2.sav' files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot3.sav'. sort cases by hldid persid. match files files=* files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot1.sav' files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\emot4.sav' /BY hldid persid. execute. recode lifesat to sat11 (sysmis=-7). freq rate1 to sat11. var lab hldid 'Household identifier'. var lab persid 'Person/diarist identifier'. temp. select if persid>1999. freq rate1 to sat11. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975W6emotion.sav'. *the emotion file is nearly complete - new just mark cases where people are not employed *as job satisfactions is not relevant. GET FILE='C:\Users\Kimberly Fisher\Documents\Kimberly\time\ATUS\AHTUS final files\Harmonised files\Supplementary files\1975-76\USA1975withspousehfep.sav' /keep hhid pid wave empstat under18 couple. rename variables (hhid pid=hldid persid). compute aw=0. if empstat>0 and empstat<4 aw=1. compute wk=0. if under18>0 wk=1. freq wk. aggregate outfile=* /break hldid persid /anywork=MAX(aw) /withkid=MAX(wk) /couple=MAX(couple). freq anywork withkid couple. sort cases by hldid persid. match files files=* files='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975W6emotion.sav' /BY hldid persid. execute. freq anywork withkid couple. recode couple (sysmis=-8). temp. select if couple=-8. freq persid. temp. select if persid>7999. freq persid. *the 33 missing cases include people with no diary and spouses in the 1980 *follow-up wave. if couple=-8 and persid>7999 couple=1. if couple=-8 and persid<7999 couple=0. cro anywork by rate8. if anywork=0 and rate8=-8 rate8=-7. val lab rate8 -8 missing -7 no job during survey period, not relevant 0 dislike a great deal 1 dislike more intensely 2 dislike 3 dislike slightly 4 dislike very slightly 5 neither dislike nor enjoy 6 enjoy very slightly 7 enjoy slightly 8 enjoy 9 enjoy more intensely 10 enjoy a great deal. cro anywork by rate8 jobsat. if anywork=0 and jobsat=-8 jobsat=-7. cro anywork by jobsat. cro withkid by rate9 rate10 rate11 rate12 sat6 sat8. if withkid=0 and rate9=-8 rate9=-7. if withkid=0 and rate10=-8 rate10=-7. if withkid=0 and rate11=-8 rate11=-7. if withkid=0 and rate12=-8 rate12=-7. if withkid=0 and sat6=-8 sat6=-7. if withkid=0 and sat8=-8 sat8=-7. val lab rate8 -8 missing -7 no child, not relevant 0 dislike a great deal 1 dislike more intensely 2 dislike 3 dislike slightly 4 dislike very slightly 5 neither dislike nor enjoy 6 enjoy very slightly 7 enjoy slightly 8 enjoy 9 enjoy more intensely 10 enjoy a great deal. cro withkid by rate9 rate10 rate11 rate12 sat6 sat8. cro couple by hapcoup. if couple=0 and hapcoup=-8 hapcoup=-7. cro couple by hapcoup. temp. select if couple=0 and hapcoup>0. freq hldid. *41 cases, seem to be people contacted in subsequent follow-up whose couple status later changed. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975W6emotion.sav' /drop anywork withkid couple. *now create the main MTUS files from the AHTUS files. GET FILE='C:\Users\Kimberly Fisher\Documents\Kimberly\time\ATUS\AHTUS final files\Harmonised files\Supplementary files\1975-76\USA1975withspousehfep.sav'. compute countrya=38. *note this data set contains a variable called survey. the variable name is retained and reset to the mtus *value, value labels overwritten by the data dictionary process. as this variable has a fixed value for *this study for the mtus, no need to retain the original information for this variable for cross-checking. compute survey = 1975. compute swave = wave. compute msamp = 0. compute day = diaryday. *note this dataset already contains the variables month and year in mtus format. compute diary = wave. compute parntid1=-9. compute parntid2=-9. aggregate outfile=* mode=addvariables /break=hhid /partid=max(pid). if couple=0 partid=-7. if couple=1 and spouse=1 partid=hhid. means partid by couple spouse /cells = min max mean. compute relrefp = 1. if spouse=1 relrefp=2. compute empinclm=wagelm. compute ocombwt=orgallwt. compute propwt=allrecwt. rename variables (hhid pid wave hhtype urban civstat ageyngst = hldid persid id hhtypeo urbano civstato agekid2). *famstat has the variable name and categories required for *MTUS. normally, this variable is an individual level *variable and could have different values for each diarist *in a household where multiple household members complete *diaries. Both members of a couple in a household with *children would have the same famstat status, though. *this variable is treated as a household variable, then *corrected for age for spouses who are in households *without children later. freq famstat agekid2. cro famstat by civstato agekid2 under18. compute nchild = under18. recode agekid2 (1 thru 4=1) (5 thru 12=2) (13 thru 17=3) (18 thru high=4) (else=-8) into agekidx. compute sector=-9. Recode incomeqt (-9=-9) (-8=-8) (1=1) (2,3=2) (4=3) into income. recode urbano (1=1) (0=2) (else=-8) into urban. Do if civstato=-8. compute civstat=-8. Else if civstato=1 or couple=1. compute civstat=1. Else. compute civstat=2. End if. *note that there are 15 cases of original household type = single woman or *single man and the number of adults = 2; these 15 cases are coded as *other household type. compute hhtype = -8. do if hhtypeo=2 and (nadult>0 and nadult<3). compute hhtype = 2. else if (hhtypeo=2 or hhtypeo=1) or (civstat=1 and nadult>1). compute hhtype = 3. else if nadult=1 and (under18=0 or hhtypeo=6 or hhtypeo=7). compute hhtype = 1. else if hhtypeo>0. compute hhtype = 4. end if. *there are 7 cases which do not have young children and where the number of adults is *reported but the number of children aged 5-18 is not known. these cases are *coded as the number of adults in the household. do if nadult>0 and under18>-1. compute hhldsize = nadult + under18. else if nadult>0. compute hhldsize = nadult. Else. compute hhldsize=-8. end if. cro civstat hhldsize hhtypeo by hhtype. *a number of complications. check and fix these. compute test=0. if hhtype=-8 and hhldsize=3 test=1. freq test. *these 22 row cases visually examined, all from one diarist (hldid=802), *this diarist only participated in the first wave of data collection. temp. select if hldid=802. freq swave. Do if hldid=802. compute famstat=3. compute hhtype=3. compute agekidx=-7. compute agekid2=-7. compute nchild=0. End if. compute test=0. if hhtype=1 and hhldsize=5 test=1. freq test. *115 row cases of this problem, associated with 1 diarist who participated all waves. Do if hldid=886. compute hhtype=4. End if. compute test=0. if hhtype=-8 and hhldsize=-8 test=1. freq test. *17 row cases of this problem, 1 spouse diarist who participated 1st wave only. Do if hldid=335. compute famstat=3. compute hhtype=2. compute agekidx=-7. compute agekid2=-7. compute nchild=0. compute hhldsize=2. End if. compute test=0. if hhtype=2 and hhldsize=1 test=1. freq test. *346 row cases of this problem, associated with 6 diarists, 2 of whom participated *in the 1st wave only, the other 4 participated all waves. If test=1 hhldsize=2. compute test=0. if hhtype=2 and hhldsize>2 test=1. freq test. *1483 row cases of this problem, associated with 18 diarists, 4 of whom *participated in 3 waves only, the others participated all waves. if test=1 hhtype=3. cro civstat hhldsize hhtypeo by hhtype. compute test=0. if hhtype=3 and hhldsize=2 test=1. freq test. *491 row cases of this problem, associated with 15 diarists, 7 of whom *participated in 1 wave only, 7 participated in 2 waves, 1 in all waves. temp. select if test=1. freq nchild agekid2 nadult civstat. temp. select if test=1. cro nchild by nadult. temp. select if test=1. cro swave by persid. if test=1 and nchild=1 and nadult=1 hhldsize=3. compute test=0. if hhtype=3 and hhldsize=2 test=1. freq test. temp. select if test=1. freq hhtypeo main sec child. *these remaining cases are a variety of original household type codes, *all report being in couples and in most cases both partners completed *diaries, yet no one reports any childcare. Likely married households *without children. Do if test=1. compute hhtype=2. compute agekidx=-7. compute agekid2=-7. compute nchild=0. End if. compute test=0. if hhtype=1 and civstat=-8 test=1. freq test. *66 cases from 3 wave 4 diaries. temp. select if test=1. cro swave by persid. temp. select if hldid=59 or hldid=532 or hldid=590. freq swave civstat. *all these cases are people who reported being single in previous *waves and who still live alone, set these cases as still civstat=2. if test=1 civstat=2. compute test=0. if hhtype=3 and civstat=-8 test=1. freq test. *16 cases from 1 wave 4 diary. temp. select if hldid=1468. freq swave persid civstat. *this person was married in previous years, household type remains married+. if test=1 civstat=1. compute test=0. if hhtype=4 and civstat=-8 test=1. freq test. *128 cases from 8 diaries from wave 4. temp. select if hldid=56 or hldid=222 or hldid=524 or hldid=661 or hldid=828 or hldid=954 or hldid=974 or hldid=1125. cro swave by civstat by persid. *all not in partnerships in early waves, not reported last wave, *change to no partner. if test=1 civstat=2. freq civstat. cro empsp by civstat. if civstat=1 and empsp=-7 empsp=-8. if civstat=1 and partid=-7 partid=-8. means partid by civstat /cells=min max. temp. select if partid>0. means partid by civstat /cells=min max. means age by retired /cells = min max mean. *retirement not asked of spouses in waves 2 and 3. cro retired by swave. compute rw1=0. compute rw4=0. if swave=1 rw1=retired. if swave=4 rw4=retired. aggregate outfile=* mode=addvariables /break hldid persid /retrdw1=MAX(rw1) /retrdw4=MAX(rw4). cro retrdw4 by retrdw1 by retired. freq retired. if retired<0 and retrdw4=retrdw1 retired=retrdw1. if retired=-8 and swave=1 retired=0. freq retired. cro retired by empstat. *if the person is below retirement age and working or not working *but retired missing, code as not retired. Do if retired<0 and (empstat=1 or empstat=2) and age<65. compute retired=0. Else if retired<0 and empstat=4 and age<60. compute retired=0. Else if retired<0 and empstat=4 and age>59. compute retired=1. End if. temp. select if retired<0 and empstat>-8 and empstat<4. cro age by empstat. If retired<0 and empstat=1 retired=0. If retired<0 and empstat=2 retired=1. if retired<0 retired=1. freq retired. cro retired by empstat. means age by retired /cells = min max mean. if retired=0 and age>64 and empstat=4 retired=1. if retired=1 and empstat=-8 empstat=4. if empstat=-8 and age>64 retired=1. if empstat=-8 and age>64 empstat=4. freq retired. means age by retired /cells = min max mean. temp. select if empstat=-8. freq wkhrs age. cro agekidx by nchild. if agekidx=-8 and nchild=0 agekidx=-7. if agekid2=-8 and nchild=0 agekid2=-7. means agekid2 by agekidx /cells=min max. temp. select if age=17. freq hldid hhtype hhldsize nchild. temp. select if age=17 and agekidx<0. freq hldid hhtype hhldsize nchild. temp. select if hldid=426 or hldid=145. cro nchild by agekidx hhldsize. Do if hldid=74 or hldid=142. compute agekid2=17. compute agekidx=3. compute nchild=nchild+1. Else if (hldid=426 or hldid=145) and nchild=1. compute nchild=2. End if. temp. select if hhldsize=2. cro agekidx by hhtype. Do if agekidx=-8 and hhldsize=2. compute agekidx=-7. compute agekid2=-7. end if. freq agekidx. *sex has the right variable name and values. recode age (80 thru high=80) (else=copy). freq age. compute cphome = -9. recode empstat (1,2,3=1) (4=0) (-8=-8) into emp. compute cohab = -9. *unemp, retired, disab & student already have the values/names for MTUS. compute educa=educ. if (educa >0 and educa <3) edcat = 1. if educa=3 edcat = 2. if educa>3 edcat = 3. if educa<0 edcat = -8. do if hhtypeo=3 or (hhtypeo=5 & under18>0). compute singpar=1. else if hhtypeo>0. compute singpar=0. Else. compute singpar=-8. end if. Do if hldid=866. compute singpar=1. End if. freq singpar. sort cases by hldid persid. match files file=* table='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\hhadd.sav' /BY hldid. execute. *ownhome in the right format for MTUS. match files files=* table='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\indadd.sav' /by hldid persid. execute. cro main by carer. if main=40 carer=1. freq carer empsp. recode wkhrs (-9=-7) (else=copy) into workhrs. means workhrs by empstat /cells=min max mean. compute m=0. if main=-8 m=time. cro baddem by lowqual by day. *no missing day of week. compute eat=0. compute trv=0. compute pcr=0. compute slp=0. If main=8 or main=9 or main=56 or sec=2 or sec=8 or sec=9 eat=1. If main=3 or main=4 or main=5 or main=78 or sec=3 or sec=5 or sec=78 slp=1. If main=1 or main=2 or main=6 or main=7 or sec=1 or sec=6 or sec=7 pcr=1. If main=62 or main=63 or (main>89 and main<99) or sec=62 or sec=63 or (sec>89 and sec<99) trv=1. aggregate outfile=* mode=addvariables /break= swave hldid persid id /maxep=MAX(epnum) /miss=SUM(m) /eatdrk=MAX(eat) /sleep=MAX(slp) /pcare=MAX(pcr) /trav=MAX(trv). compute nep=0. if maxep<7 nep=1. compute dobasic=eatdrk+sleep+pcare+trav. freq dobasic nep. compute misbasic=0. if lowqual=1 and dobasic<3 misbasic=1. cro misbasic by nep maxep. Do If baddem=0 and lowqual=0. compute badcase=0. Else if baddem=1 and lowqual=0 and day>0. compute badcase=1. Else if baddem=0 and lowqual=0 and day=-8. compute badcase=2. Else if baddem=0 and day>-8 and nep=0 and miss=1 and misbasic=0. compute badcase=3. Else if baddem=0 and day>-8 and nep=1 and miss=0 and misbasic=0. compute badcase=4. Else if baddem=0 and day>-8 and nep=0 and miss=0 and misbasic=1. compute badcase=5. Else if baddem=1 and day=-8 and nep=0 and miss=0 and misbasic=0. compute badcase=6. Else if baddem=1 and day>-8 and nep=0 and miss=1 and misbasic=0. compute badcase=7. Else if baddem=1 and day>-8 and nep=1 and miss=0 and misbasic=0. compute badcase=8. Else if baddem=1 and day>-8 and nep=0 and miss=0 and misbasic=1. compute badcase=9. Else if baddem=0 and day=-8 and nep=0 and miss=1 and misbasic=0. compute badcase=10. Else if baddem=0 and day=-8 and nep=1 and miss=0 and misbasic=0. compute badcase=11. Else if baddem=0 and day=-8 and nep=0 and miss=0 and misbasic=1. compute badcase=12. Else if baddem=0 and day>-8 and nep=1 and miss=1 and misbasic=0. compute badcase=13. Else if baddem=0 and day>-8 and nep=0 and miss=1 and misbasic=1. compute badcase=14. Else if baddem=0 and day>-8 and nep=1 and miss=0 and misbasic=1. compute badcase=15. Else if baddem=1 and day=-8 and nep=0 and miss=1 and misbasic=0. compute badcase=16. Else if baddem=1 and day=-8 and nep=1 and miss=0 and misbasic=0. compute badcase=17. Else if baddem=1 and day=-8 and nep=0 and miss=0 and misbasic=1. compute badcase=18. Else if baddem=1 and day>-8 and nep=1 and miss=1 and misbasic=0. compute badcase=19. Else if baddem=1 and day>-8 and nep=0 and miss=1 and misbasic=1. compute badcase=20. Else if baddem=1 and day>-8 and nep=1 and miss=0 and misbasic=1. compute badcase=21. Else if baddem=0 and day=-8 and nep=1 and miss=1 and misbasic=0. compute badcase=22. Else if baddem=0 and day=-8 and nep=0 and miss=1 and misbasic=1. compute badcase=23. Else if baddem=0 and day=-8 and nep=1 and miss=0 and misbasic=1. compute badcase=24. Else if baddem=0 and day>-8 and nep=1 and miss=1 and misbasic=1. compute badcase=25. Else if baddem=1 and day=-8 and nep=1 and miss=1 and misbasic=0. compute badcase=26. Else if baddem=1 and day=-8 and nep=0 and miss=1 and misbasic=1. compute badcase=27. Else if baddem=1 and day=-8 and nep=1 and miss=0 and misbasic=1. compute badcase=28. Else if baddem=1 and day>-8 and nep=1 and miss=1 and misbasic=1. compute badcase=29. Else if baddem=0 and day=-8 and nep=1 and miss=1 and misbasic=1. compute badcase=30. Else. compute badcase=31. End if. val lab badcase 0 good case 1 miss age or sex only 2 miss day of week only 3 "miss 91+ minutes only" 4 "<7 episodes only" 5 "miss 2+ basic acts only" 6 "miss age/sex + day of week" 7 "miss age/sex + 91+ min" 8 "miss age/sex + <7 episodes" 9 "miss age/sex + 2+ basic acts" 10 "miss day of week + 91+ min" 11 "miss day of week + <7 episodes" 12 "miss day of week + 2+ basic acts" 13 "miss 91+ min + <7 episodes" 14 "miss 91+ min + 2+ basic acts" 15 "<7 ep & miss 2+ basic acts" 16 "miss age/sex + day or week + 91+ min" 17 "miss age/sex + day or week + <7 episodes" 18 "miss age/sex + day or week + 2+ basic acts" 19 "miss age/sex + 91+ min + <7 eps" 20 "miss age/sex + 91+ min + 2+ basic acts" 21 "miss age/sex + 2+ basic acts + <7 eps" 22 "miss day or week + 91+ min + <7 eps" 23 "miss day or week + 91+ min + 2+ basic acts" 24 "miss day or week + 2+ basic acts + <7 eps" 25 "miss 91+ min + 2+ basic acts + <7 eps" 26 "miss age/sex + day or week + 91+ min + <7 episodes" 27 "miss age/sex + day or week + 91+ min + 2+ basic acts" 28 "miss age/sex + day or week + <7 episodes + 2+ basic acts" 29 "miss age/sex + 91+ min + <7 episodes + 2+ basic acts" 30 "day or week + 91+ min + <7 episodes + 2+ basic acts" 31 bad on all five points. freq badcase. vector avx(41). loop i=1 to 41. compute avx(i)=0. end loop. execute. vector mainx(69) secx(69). loop i=1 to 69. compute mainx(i)=0. compute secx(i)=69. end loop. compute mainx=0. compute secx=69. compute av=0. *********************************** *computation of time use variables* ***********************************. *fill in AV variables. compute residual=0. do if main=8 or main=10 or main=13 or main=14. compute avx1=time. compute av=1. else if main=11. compute avx2=time. compute av=2. else if main=12 or main=15. compute avx3=time. compute av=3. else if main=16 or main=18 or main=19. compute avx4=time. compute av=4. else if main=92 or main=93 or main=94. compute avx5=time. compute av=5. else if main=20 or main=21. compute avx6=time. compute av=6. else if main=22 or main=23. compute avx7=time. compute av=7. else if main=24 or main=25 or main=40 or main=68. compute avx8=time. compute av=8. else if main=67. compute avx9=time. compute av=9. else if main=26 or main=27 or main=30 or main=31. compute avx10=time. compute av=10. else if main=65 or (main>32 and main<40). compute avx11=time. compute av=11. else if main=91 or (main>94 and main<98). compute avx12=time. compute av=12. else if main=1 or main=2 or main=6. compute avx13=time. compute av=13. else if main=7 or main=28 or main=29 or main=32. compute avx14=time. compute av=14. else if main=9 and eloc~=6. compute avx15=time. compute av=15. else if main=3 or main=4 or main=5. compute avx16=time. compute av=16. else if main=90 or main=98. compute avx17=time. compute av=17. else if main=50 or main=54 or main=55 or main=64. compute avx18=time. compute av=18. else if main=60 or main=63 or main=66. compute avx19=time. compute av=19. else if main=51. compute avx20=time. compute av=20. else if main=62. compute avx21=time. compute av=21. else if main=49. compute avx22=time. compute av=22. else if (main>40 and main<47) or main=48. compute avx23=time. compute av=23. else if main=52 or main=53. compute avx24=time. compute av=24. else if main=57. compute avx25=time. compute av=25. else if main=56. compute avx27=time. compute av=27. else if main=9 and eloc=6. compute avx28=time. compute av=28. else if (main=71 or main=72) and eloc>1. compute avx29=time. compute av=29. else if main=85. compute avx30=time. compute av=30. else if main=86. compute avx31=time. compute av=31. else if main=84. compute avx32=time. compute av=32. else if main=17. compute avx33=time. compute av=33. else if main=81. compute avx34=time. compute av=34. else if main=82 or main=83. compute avx35=time. compute av=35. else if main=78. compute avx36=time. compute av=36. else if main=88. compute avx37=time. compute av=37. else if (main=71 or main=72) and eloc<2. compute avx38=time. compute av=38. else if main=76. compute avx39=time. compute av=39. else if main=70 or main=73 or main=74 or main=75 or main=77 or main=87 or main=89. compute avx40=time. compute av=40. else if main=-8 or main=58. compute avx41=time. compute av=41. else. compute residual=main. end if. freq residual av. temp. select if av<8. cro main by av. temp. select if av>7 and av<16. cro main by av. temp. select if av>15 and av<24. cro main by av. temp. select if av>23 and av<32. cro main by av. temp. select if av>31. cro main by av. *check if can separately identify dog walking. temp. select if main=68. freq mtrav sec. *41 episodes where travel happened either alongside or after the *pet care, 2 episodes combined with sports, 2 compound pet care, *not possible to successfully create dog walking. *fill in main variables. compute residual=0. Do if main=2. compute mainx1=time. compute mainx=1. Else if main=4. compute mainx3=time. compute mainx=3. Else if main=3 or main=5. compute mainx2=time. compute mainx=2. Else if main=1 or main=6 or main=7. compute mainx4=time. compute mainx=4. Else if main=8. compute mainx5=time. compute mainx=5. Else if main=9. compute mainx6=time. compute mainx=6. Else if main=10. compute mainx7=time. compute mainx=7. Else if main=11. compute mainx8=time. compute mainx=8. Else if main=12. compute mainx9=time. compute mainx=9. Else if main=92. compute mainx11=time. compute mainx=11. Else if main=13. compute mainx12=time. compute mainx=12. Else if main=14. compute mainx13=time. compute mainx=13. Else if main=15. compute mainx14=time. compute mainx=14. Else if main=16. compute mainx15=time. compute mainx=15. Else if main=17. compute mainx16=time. compute mainx=16. Else if main=18 or main=19. compute mainx17=time. compute mainx=17. Else if main=20. compute mainx18=time. compute mainx=18. Else if main=21. compute mainx19=time. compute mainx=19. Else if main=22. compute mainx20=time. compute mainx=20. Else if main=23. compute mainx21=time. compute mainx=21. Else if main=24. compute mainx22=time. compute mainx=22. Else if main=25. compute mainx23=time. compute mainx=23. Else if main=26 or main=27. compute mainx24=time. compute mainx=24. Else if main=28 or main=29. compute mainx25=time. compute mainx=25. Else if main=30 or main=31 or main=32. compute mainx26=time. compute mainx=26. Else if main=68. compute mainx27=time. compute mainx=27. Else if main=33 or main=34 or main=35. compute mainx28=time. compute mainx=28. Else if main=37. compute mainx29=time. compute mainx=29. Else if main=36 or main=38 or main=65. compute mainx30=time. compute mainx=30. Else if main=39. compute mainx31=time. compute mainx=31. Else if main=40. compute mainx32=time. compute mainx=32. Else if (main>40 and main<47) or main=48. compute mainx33=time. compute mainx=33. Else if main=49. compute mainx34=time. compute mainx=34. Else if main=50. compute mainx35=time. compute mainx=35. Else if main=51. compute mainx36=time. compute mainx=36. Else if main=52 or main=53. compute mainx37=time. compute mainx=37. Else if main=54 or main=55. compute mainx38=time. compute mainx=38. Else if main=56 or (main=9 and eloc=6). compute mainx39=time. compute mainx=39. Else if main=57. compute mainx40=time. compute mainx=40. Else if main=58. compute mainx41=time. compute mainx=41. Else if main=60. compute mainx42=time. compute mainx=42. Else if main=62. compute mainx43=time. compute mainx=43. Else if main=63. compute mainx44=time. compute mainx=44. Else if main=64. compute mainx45=time. compute mainx=45. Else if main=66 or main=67. compute mainx46=time. compute mainx=46. Else if main=70. compute mainx51=time. compute mainx=51. Else if main=72. compute mainx48=time. compute mainx=48. Else if main=88. compute mainx49=time. compute mainx=49. Else if main=71 or main=73. compute mainx50=time. compute mainx=50. Else if main=74 or main=75. compute mainx52=time. compute mainx=52. Else if main=87. compute mainx53=time. compute mainx=53. Else if main=76 or main=77. compute mainx54=time. compute mainx=54. Else if main=78. compute mainx55=time. compute mainx=55. Else if main=81 or main=82 or main=83. compute mainx56=time. compute mainx=56. Else if main=84. compute mainx57=time. compute mainx=57. Else if main=85. compute mainx58=time. compute mainx=58. Else if main=86. compute mainx59=time. compute mainx=59. Else if main=89. compute mainx61=time. compute mainx=61. Else if main=90. compute mainx62=time. compute mainx=62. Else if main=93. compute mainx63=time. compute mainx=63. Else if main=94. compute mainx64=time. compute mainx=64. Else if main=97. compute mainx65=time. compute mainx=65. Else if main=96. compute mainx66=time. compute mainx=66. Else if main=91 or main=95. compute mainx67=time. compute mainx=67. Else if main=98. compute mainx68=time. compute mainx=68. Else if main=-8. compute mainx69=time. compute mainx=69. else. compute residual=main. end if. freq residual mainx. temp. select if mainx<11. cro main by mainx. temp. select if mainx>10 and mainx<21. cro main by mainx. temp. select if mainx>20 and mainx<31. cro main by mainx. temp. select if mainx>30 and mainx<41. cro main by mainx. temp. select if mainx>40 and mainx<51. cro main by mainx. temp. select if mainx>50 and mainx<61. cro main by mainx. temp. select if mainx>60. cro main by mainx. *fill in secondary activity variables. compute residual=0. Do if sec=2. compute secx1=time. compute secx=1. Else if sec=4. compute secx3=time. compute secx=3. Else if sec=3 or sec=5. compute secx2=time. compute secx=2. Else if sec=1 or sec=6 or sec=7. compute secx4=time. compute secx=4. Else if sec=8. compute secx5=time. compute secx=5. Else if sec=9. compute secx6=time. compute secx=6. Else if sec=10. compute secx7=time. compute secx=7. Else if sec=11. compute secx8=time. compute secx=8. Else if sec=12. compute secx9=time. compute secx=9. Else if sec=92. compute secx11=time. compute secx=11. Else if sec=13. compute secx12=time. compute secx=12. Else if sec=14. compute secx13=time. compute secx=13. Else if sec=15. compute secx14=time. compute secx=14. Else if sec=16. compute secx15=time. compute secx=15. Else if sec=17. compute secx16=time. compute secx=16. Else if sec=18 or sec=19. compute secx17=time. compute secx=17. Else if sec=20. compute secx18=time. compute secx=18. Else if sec=21. compute secx19=time. compute secx=19. Else if sec=22. compute secx20=time. compute secx=20. Else if sec=23. compute secx21=time. compute secx=21. Else if sec=24. compute secx22=time. compute secx=22. Else if sec=25. compute secx23=time. compute secx=23. Else if sec=26 or sec=27. compute secx24=time. compute secx=24. Else if sec=28 or sec=29. compute secx25=time. compute secx=25. Else if sec=30 or sec=31 or sec=32. compute secx26=time. compute secx=26. Else if sec=68. compute secx27=time. compute secx=27. Else if sec=33 or sec=34 or sec=35. compute secx28=time. compute secx=28. Else if sec=37. compute secx29=time. compute secx=29. Else if sec=36 or sec=38 or sec=65. compute secx30=time. compute secx=30. Else if sec=39. compute secx31=time. compute secx=31. Else if sec=40. compute secx32=time. compute secx=32. Else if (sec>40 and sec<47) or sec=48. compute secx33=time. compute secx=33. Else if sec=49. compute secx34=time. compute secx=34. Else if sec=50. compute secx35=time. compute secx=35. Else if sec=51. compute secx36=time. compute secx=36. Else if sec=52 or sec=53. compute secx37=time. compute secx=37. Else if sec=54 or sec=55. compute secx38=time. compute secx=38. Else if sec=56 or (sec=9 and eloc=6). compute secx39=time. compute secx=39. Else if sec=57. compute secx40=time. compute secx=40. Else if sec=58. compute secx41=time. compute secx=41. Else if sec=60. compute secx42=time. compute secx=42. Else if sec=62. compute secx43=time. compute secx=43. Else if sec=63. compute secx44=time. compute secx=44. Else if sec=64. compute secx45=time. compute secx=45. Else if sec=66 or sec=67. compute secx46=time. compute secx=46. Else if sec=70. compute secx51=time. compute secx=51. Else if sec=72. compute secx48=time. compute secx=48. Else if sec=88. compute secx49=time. compute secx=49. Else if sec=71 or sec=73. compute secx50=time. compute secx=50. Else if sec=74 or sec=75. compute secx52=time. compute secx=52. Else if sec=87. compute secx53=time. compute secx=53. Else if sec=76 or sec=77. compute secx54=time. compute secx=54. Else if sec=78. compute secx55=time. compute secx=55. Else if sec=81 or sec=82 or sec=83. compute secx56=time. compute secx=56. Else if sec=84. compute secx57=time. compute secx=57. Else if sec=85. compute secx58=time. compute secx=58. Else if sec=86. compute secx59=time. compute secx=59. Else if sec=89. compute secx61=time. compute secx=61. Else if sec=90. compute secx62=time. compute secx=62. Else if sec=93. compute secx63=time. compute secx=63. Else if sec=94. compute secx64=time. compute secx=64. Else if sec=97. compute secx65=time. compute secx=65. Else if sec=96. compute secx66=time. compute secx=66. Else if sec=91 or sec=95. compute secx67=time. compute secx=67. Else if sec=98. compute secx68=time. compute secx=68. else. compute residual=sec. end if. if residual=-7 secx=-7. freq residual secx. *cday, time, start, end, epnum, eloc are in the MTUS W6 format. compute clockst=clockst/100. recode inout (1=2) (2=1) (else=copy). compute ict=-9. *alone, sppart, child already in MTUS format. freq alone infant child sppart clsfam hhadult animal shoprof cowork wellknw otherp unknwp. Do if otherp=1 or shoprof=1 or sppart=1. compute oad=1. Else if hhadult=-7. compute oad=-7. Else if cowork=1 or hhadult=1. compute oad=1. Else. compute oad=0. End if. cro oad by otherp cowork shoprof hhadult sppart. sort cases by countrya survey swave msamp hldid persid id epnum. SAVE OUTFILE='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\usa1975hef.sav' /keep countrya survey swave msamp hldid persid id day cday month year diary badcase sex age time clockst start end epnum mainx secx av inout eloc ict mtrav alone child sppart oad. recode civstat (-8=2) (else=copy). compute occup=-9. compute sptime=0. if sppart=1 sptime=time. desc occup sptime. *fix remaining errors. if hldid=954 and swave=4 singpar=0. if (hldid=1144 or hldid=1408) and swave=4 hhtype=3. if (hldid=92 and swave=3) or (hldid=954 and swave=4) or (hldid=1422 and swave>2) agekidx=-7. if (hldid=92 and swave=3) or (hldid=954 and swave=4) or (hldid=1422 and swave>2) agekid2=-7. aggregate /outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\sum.sav' /break=countrya survey swave msamp hldid persid id /parntid1=MAX(parntid1) /parntid2=MAX(parntid2) /partid=MAX(partid) /day=max(day) /month=max(month) /year=max(year) /diary=max(diary) /badcase=max(badcase) /hhtype=max(hhtype) /hhldsize=max(hhldsize) /nchild=max(nchild) /agekidx=max(agekidx) /agekid2=max(agekid2) /incorig=max(income75) /income=max(income) /ownhome=max(ownhome) /urban=max(urban) /computer=max(computer) /vehicle=max(vehicle) /sex=MAX(sex) /age=MAX(age) /famstat=max(famstat) /cphome=max(cphome) /singpar=max(singpar) /relrefp=max(relrefp) /civstat=max(civstat) /cohab=max(cohab) /citizen=max(citizen) /empstat=max(empstat) /emp=max(emp) /unemp=max(unemp) /student=max(student) /retired=max(retired) /empsp=max(empsp) /workhrs=max(workhrs) /empinclm=max(empinclm) /occup=max(occup) /sector=max(sector) /educa=max(educa) /edcat=max(edcat) /rushed=max(rushed) /health=max(health) /carer=max(carer) /disab=max(disab) /av1 = sum(avx1) /av2 = sum(avx2) /av3 = sum(avx3) /av4 = sum(avx4) /av5 = sum(avx5) /av6 = sum(avx6) /av7 = sum(avx7) /av8 = sum(avx8) /av9 = sum(avx9) /av10= sum(avx10) /av11=sum(avx11) /av12=sum(avx12) /av13=sum(avx13) /av14= sum(avx14) /av15=sum(avx15) /av16=sum(avx16) /av17=sum(avx17) /av18= sum(avx18) /av19=sum(avx19) /av20=sum(avx20) /av21=sum(avx21) /av22= sum(avx22) /av23=sum(avx23) /av24=sum(avx24) /av25=sum(avx25) /av26= max(avx26) /av27=sum(avx27) /av28=sum(avx28) /av29=sum(avx29) /av30= sum(avx30) /av31=sum(avx31) /av32=sum(avx32) /av33=sum(avx33) /av34= sum(avx34) /av35=sum(avx35) /av36=sum(avx36) /av37=sum(avx37) /av38= sum(avx38) /av39=sum(avx39) /av40=sum(avx40) /av41=sum(avx41) /main1=sum(mainx1) /main2=sum(mainx2) /main3=SUM(mainx3) /main4 =sum(mainx4 ) /main5 =SUM(mainx5 ) /main6 =SUM(mainx6 ) /main7 =SUM(mainx7 ) /main8 =SUM(mainx8 ) /main9 =SUM(mainx9 ) /main10=SUM(mainx10) /main11=SUM(mainx11) /main12=SUM(mainx12) /main13=SUM(mainx13) /main14=SUM(mainx14) /main15=SUM(mainx15) /main16=SUM(mainx16) /main17=SUM(mainx17) /main18=SUM(mainx18) /main19=SUM(mainx19) /main20=SUM(mainx20) /main21=SUM(mainx21) /main22=SUM(mainx22) /main23=SUM(mainx23) /main24=SUM(mainx24) /main25=SUM(mainx25) /main26=SUM(mainx26) /main27=SUM(mainx27) /main28=SUM(mainx28) /main29=SUM(mainx29) /main30=SUM(mainx30) /main31=SUM(mainx31) /main32=SUM(mainx32) /main33=SUM(mainx33) /main34=SUM(mainx34) /main35=SUM(mainx35) /main36=SUM(mainx36) /main37=SUM(mainx37) /main38=SUM(mainx38) /main39=SUM(mainx39) /main40=SUM(mainx40) /main41=SUM(mainx41) /main42=SUM(mainx42) /main43=SUM(mainx43) /main44=SUM(mainx44) /main45=SUM(mainx45) /main46=SUM(mainx46) /main47=SUM(mainx47) /main48=SUM(mainx48) /main49=SUM(mainx49) /main50=SUM(mainx50) /main51=SUM(mainx51) /main52=SUM(mainx52) /main53=SUM(mainx53) /main54=SUM(mainx54) /main55=SUM(mainx55) /main56=SUM(mainx56) /main57=SUM(mainx57) /main58=SUM(mainx58) /main59=SUM(mainx59) /main60=SUM(mainx60) /main61=SUM(mainx61) /main62=SUM(mainx62) /main63=SUM(mainx63) /main64=SUM(mainx64) /main65=SUM(mainx65) /main66=SUM(mainx66) /main67=SUM(mainx67) /main68=SUM(mainx68) /main69=SUM(mainx69) /sppart=MAX(sptime) /ocombwt=max(ocombwt) /propwt= max(propwt). get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\sum.sav'. compute tottime = sum(av1 to av41). compute tot2 = sum(main1 to main69). freq tottime tot2. desc av1 to av41. desc main1 to main69. *recode time use variables which could not be create for this study to -9. recode av26 main10 main11 main47 main60 main61 (0=-9). formats main1 to main69 (f6.0). freq av26 main10 main11 main47 main60 main61. recode empinclm (-9=-7). *fix error. if hldid=802 singpar=0. temp. select if hldid=136. cro swave by famstat agekidx agekid2. apply dictionary from 'C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\MTUS database\schema&etc\MTUShafschema.sav'. val lab educa -8 missing -7 not asked 1 "ed ended 0 - 8th grade" 2 "ed ended 9 - 11th grade" 3 high school graduate 4 some college 5 college graduate 6 post college. if civstat=2 sppart=-7. desc sppart. *correct remaining errors. recode student retired disab (-9=-7). if age=17 famstat=5. if persid=142 famstat=2. if unemp=1 and empstat=-8 empstat=4. if unemp=1 and emp=-8 emp=0. Do if hldid=1396. compute nchild=0. compute singpar=0. compute famstat=0. Else if hldid=835 or hldid=1136. compute agekidx=3. compute agekid2=-8. end if. compute propwt=propwt*(7088/7087.72). *correct last remaining errors. if hldid=118 and swave<3 agekidx=-7. if hldid=118 and swave<3 agekid2=-7. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975haf.sav' /keep countrya survey swave msamp hldid persid id parntid1 parntid2 partid day month year diary badcase hhtype hhldsize nchild agekidx agekid2 incorig income ownhome urban computer vehicle sex age famstat cphome singpar relrefp civstat cohab citizen empstat emp unemp student retired empsp workhrs empinclm occup sector educa edcat rushed health carer disab av1 av2 av3 av4 av5 av6 av7 av8 av9 av10 av11 av12 av13 av14 av15 av16 av17 av18 av19 av20 av21 av22 av23 av24 av25 av26 av27 av28 av29 av30 av31 av32 av33 av34 av35 av36 av37 av38 av39 av40 av41 main1 main2 main3 main4 main5 main6 main7 main8 main9 main10 main11 main12 main13 main14 main15 main16 main17 main18 main19 main20 main21 main22 main23 main24 main25 main26 main27 main28 main29 main30 main31 main32 main33 main34 main35 main36 main37 main38 main39 main40 main41 main42 main43 main44 main45 main46 main47 main48 main49 main50 main51 main52 main53 main54 main55 main56 main57 main58 main59 main60 main61 main62 main63 main64 main65 main66 main67 main68 main69 sppart ocombwt propwt. *final tidy of aggregate version. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975haf.sav'. desc hldid persid id incorig age workhrs empinclm av1 av2 av3 av4 av5 av6 av7 av8 av9 av10 av11 av12 av13 av14 av15 av16 av17 av18 av19 av20 av21 av22 av23 av24 av25 av26 av27 av28 av29 av30 av31 av32 av33 av34 av35 av36 av37 av38 av39 av40 av41 ocombwt propwt. desc age main1 to main69 sppart. freq badcase. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK=countrya /wtsum = SUM(propwt). freq wtsum. freq countrya survey swave msamp parntid1 parntid2 partid day month year diary badcase hhtype hhldsize nchild agekidx agekid2 income ownhome urban computer vehicle sex age famstat cphome singpar relrefp civstat cohab citizen empstat emp unemp student retired empsp workhrs occup sector educa edcat rushed health carer disab incorig. means age hhldsize nchild by famstat /cells min max. temp. select if age>-8. means age by famstat /cells min max. means age hhldsize by nchild retired /cells min max median. cro famstat by nchild civstat hhtype agekidx cphome. cro agekidx by nchild. cro empstat by emp unemp retired student disab. cro empsp by civstat relrefp. cro civstat by hhtype relrefp cohab cphome. *note no relrefp=2 should appear if civstat=2. cro hhtype by hhldsize. cro parntid1 by parntid2. weight by propwt. freq day badcase. cro day by sex /cells= count column. weight off. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975haf.sav' /drop wtsum /compressed. *final tidy of episode files. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\usa1975hef.sav'. rename variables (mainx secx=main sec). apply dictionary from 'C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\MTUS database\schema&etc\MTUShefschema.sav'. *check labels and distrubutions. freq countrya survey swave msamp day cday month year diary badcase sex age clockst epnum main sec av inout eloc ict mtrav alone child sppart oad. cro mtrav by inout. desc hldid persid id age epnum time start end. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\usa1975hef.sav' /compressed. means epnum by sex /cells min max mean. *tidy emotions file. get file='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975W6emotion.sav'. compute countrya=38. compute survey = 1975. freq rate1 rate2 rate3 rate4 rate5 rate6 rate7 rate8 rate9 rate10 rate11 rate12 rate13 rate14 rate15 rate16 rate17 rate18 rate19 rate20 rate21 rate22 lifesat hhincsat stlivsat getahead jobsat incomfrt hapcoup frtmsat frtmwst sat1 sat2 sat3 sat4 sat5 sat6 sat7 sat8 sat9 sat10 sat11. temp. select if lifesat=-7. desc persid. temp. select if rate10>-7. desc persid. save outfile='C:\Users\Kimberly Fisher\Documents\Kimberly\time\mtus\mtus data\W553\USA\1975-76\USA1975W6emotion.sav' /keep countrya survey hldid persid rate1 rate2 rate3 rate4 rate5 rate6 rate7 rate8 rate9 rate10 rate11 rate12 rate13 rate14 rate15 rate16 rate17 rate18 rate19 rate20 rate21 rate22 lifesat hhincsat stlivsat getahead jobsat incomfrt hapcoup frtmsat frtmwst sat1 sat2 sat3 sat4 sat5 sat6 sat7 sat8 sat9 sat10 sat11 /compressed.