/* LAST UPDATED 7/5/98 wifevar.sas: list of comparable or created variables for THAILAND WIFE QUESTIONNAIRE This includes stuff for each of wifehh, wife1, wife2, wife3 etc. Note: Respondents her are ALL women in the 15-44 age group. Their children are mostly going to school, and they are not old and hence not receiving help from children. Many questions of the pinkw questionnaire therefore do not apply here. */ /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= PART I: THESE CREATED VARIABLES ARE NAMED EXACTLY AS THEY ARE IN THE COSTA-RICAN QUESTIONNAIRE. These are arranged in the same format as Costa Rican questionnaire. (in Part II we have those variables specific to Thailand. Those variables which are specific only to Thailand are excluded from here.) =*=*=*=*=*=*=*=*=*==*=*=*==*=*==*==*=*==*=*==*=*=*==*=*==*==**/ /* This part is that part of the background of the Thai questionnaire which was not asked specifically in the Costa Rican questionnaire. If there is any part of this questionnaire that is found similarly to the Costa Rican one, that part has been moved/ should be moved to that section */ /* This step is CRITICAL: do not erase. It will create a villid variable for each questionnaire/observation Note: You might have to change the path appropriately if the programs are shifted to another machine */ %include '~/THAI/VAR/villid.sas'; /* Some imp labels for variables out of the questionnaire */ label dc = '# of deceased children'; label age = 'Age of wife'; /****************************************************** BACKGROUND INFORMATION CHART ******************************************************/ if province=1 then provkanc=1;else provkanc=0; label provkanc='Province Kanchanaburi'; if province=2 then provchai=1;else provchai=0; label provchai='Province chainat'; if province=3 then provkhon=1;else provkhon=0; label provkhon='Province Khon Kaen'; if province=4 then provnong=1;else provnong=0; label provnong='province Nong Khai'; /* Questions 1, 2 at Page 2 */ if q1b=1 then oldmalhh=1;else oldmalhh=0; label oldmalhh='old male househead'; if q1c=1 then oldfemhh=1;else oldfemhh=0; label oldfemhh='old female househead'; if q2a=1 then parinhh=1;else parinhh=0; label parinhh='par in household'; if q2c=1 then marchinh=1;else marchinh=0; label marchinh='married chld in household'; if q2d=1 then sibinh=1;else sibinh=0; label sibinh='bros/sis. in household'; if q2e=1 then gchinh=1;else gchinh=0; label gchinh='grandchld in household'; if q2f=1 then orelinh=1;else orelinh=0; label orelinh='other rel. in household'; if q2g=1 then othinh=1;else othinh=0; label othinh='others in household'; /* Questions 3, .. at Page 3 */ nboysinh=mpop1; label nboysinh='# of boys in hh'; ngirlinh=fpop1; label ngirlinh='# of girls in hh'; naduminh=mpop2 + mpop3 + mpop4 + mpop5; label naduminh='# of adult male in hh'; nadufinh=fpop2 + fpop3 + fpop4 + fpop5; label nadufinh='# of adult female in hh'; nchilinh=nboysinh+ngirlinh; label nchilinh='# of total chld in hh'; nadulinh=naduminh+nadufinh; label nadulinh='# of total adult in hh'; nmembhh=nchilinh+nadufinh; label nmembhh='# of total member in hh'; /* Questions 4,5,6 Page 3 */ if q4=1 then farmhh=1;else farmhh=0; label farmhh='hh earning from farming'; if q4=2 then wagehh=1;else wagehh=0; label wagehh='hh earning from wage'; if q4=3 then bushh=1;else bushh=0; label bushh='hh earning from business'; if q4=4 then tradehh=1;else tradehh=0; label tradehh='hh earning from trade'; if q4=0 | q4=5 then otherhh=1;else otherhh=0; label otherhh='hh earning from other'; if q6=1 then buddhist=1;else buddhist=0; if q6=2 then islam=1;else islam=0; if q6=3 then x_tian=1;else x_tian=0; if q6=4 | q6=5 | q6=6 | q6=7 | q6=8 | q6=9 then other=1; else other=0; /****************************************************** HOUSING AND CONSUMER GOODS ******************************************************/ /* Question 7, Page 3 */ if q7=2 then ownhouse=1;else ownhouse=0; label ownhouse='h owned by someone in hh'; if q7a=3 then hoownpar=1;else hoownpar=0; label hoownpar='h owned by par in hh'; if q7a=4 then hownparl=1;else hownparl=0; label hownparl='h owned by lpar in hh'; if (ownhouse = 1 | hoownpar = 1 | hownparl = 1) then hhownhs = 1; else hhownhs = 0; /* Question 8, Page 4 */ if q8=2 then landown=1;else landown=0; label landown='land owned by someone in hh'; if q8a=3 then lownpar=1;else lownpar=0; label lownpar=' land owned by par in hh'; if q8a=4 then lownparl=1;else lownparl=0; label lownparl='land owned by lpar in hh'; valhse = q9; if ownhouse = 0 then valhse = 0; if q9 = 0 then valhse = 0; if q9 = . then valhse = 0; if q9 = 9999999 then valhse = .; valhouse = valhse / 10000; if valhse = . then valhouse = .; if valhse = 0 then valhouse = 0; label valhouse = 'Value of house, if owned'; /* Questions 12, 13, Page 5 */ if q13=1 then elect=1;else elect=0; if q13_1 > 0 then yrelect = q13_1; if q13_1 = . then yrelect = 7.204; if elect = 0 then helect = 0; if elect = 1 and yrelect <= 7.204 then helect = 1; if elect = 1 and yrelect > 7.204 then helect = 2; label helect='HH has electricity: index'; /* Questions 14 Page 6 */ if tv1=1 then tvbw=1;else tvbw=0; label tvbw='black-white TV'; if tv2=1 then tvc=1;else tvc=0; label tvc='color TV'; if vdo=1 then video=1;else video=0; if refrig=1 then refrige=1;else refrige=0; if radio1=1 then radio=1;else radio=0; if radio2=1 then taperec=1;else taperec=0; if stereo=1 then stereo=1 ;else stereo=0; if fan=1 then fan=1;else fan=0; if iron=1 then iron=1;else iron=0; if cooker=1 then cooker=1;else cooker=0; if pump1=1 then pumpelec=1;else pumpelec=0; if gasstove=1 then gasstove=1;else gasstove=0; if bicycle=1 then bike=1;else bike=0; if motorcy=1 then mcycle=1;else mcycle=0; if pickup=1 then pickup=1;else pickup=0; if car=1 then car=1;else car=0; if pump2=1 then pumpgas=1;else pumpgas=0; if tractor=1 then tractor=1;else tractor=0; if vehicle=1 then vehicle=1;else vehicle=0; cntdur=tvbw+tvc+video+refrige+radio+taperec+stereo+fan+iron+ cooker+pumpelec+gasstove+bike+mcycle+pickup+ car+pumpgas+tractor+vehicle; label cntdur = '# of cons.durab in hh out of 19;' /* Q. 15, p. 7 */ if rooms = 9 then norooms = .; if rooms = . then nrooms = .; else norooms = rooms; if norooms > 6 then hhrooms = 3; if 3 < norooms < 6 then hhrooms = 2; if norooms < 3 then hhrooms = 1; /* Questions 16,17,18, Page 7 */ if q16=3 | q16=4 | q16=5 then househq1=1; else househq1=0; label househq1='2 floor w/ wood/cement, or separate cem.'; if q17=1 | q17=3 then househq2=1; else househq2=0; label househq2='wall is cement/wood'; if q18=1 | q18=2 then househq3=1; else househq3=0; label househq3='roof is cement/tile'; /* Questions 19 Page 8 */ if q19=4 | q19=5 then floorhq=1; else floorhq=0; label floorhq=' floor is wooden/tile'; if q20=1 | q20=2 then toilethq=1; else toilethq=0; label toilethq='toilet lab.with tank'; if hhownhs = 1 and helect = 1 and (norooms > 6) then hhwealth = 4; if hhownhs = 1 and helect = 1 and (3< norooms < 6) then hhwealth = 3; if hhownhs = 0 and helect = 1 and (norooms > 3) then hhwealth = 2; if hhownhs = 0 and helect = 0 and (norooms > 3) then hhwealth = 1; if hhownhs = 0 and helect = 0 and (norooms < 3) then hhwealth = 0; /****************************************************** INCOME AND PRODUCTIVE ASSETS ******************************************************/ /* Question 15 at p. 18 */ if (income1 = 99997 |income1 = 99998 | income1= 99999) then winc1 = .; else winc1 = income1; if (income2 = 99997 |income2 = 99998 | income2= 99999) then winc2 = .; else winc2 = income2; if (income3 = 99997 |income3 = 99998 | income3= 99999) then winc3 = .; else winc3 = income3; if (income4 = 99997 |income4 = 99998 | income4= 99999) then winc4 = .; else winc4 = income4; if (income5 = 99997 |income5 = 99998 | income5= 99999) then winc5 = .; else winc5 = income5; if (income6 = 99997 |income6 = 99998 | income6= 99999) then winc6 = .; else winc6 = income6; if (income7 = 99997 |income7 = 99998 | income7= 99999) then winc7 = .; else winc7 = income7; if (income8 = 99997 |income8 = 99998 | income8= 99999) then winc8 = .; else winc8 = income8; if (income9 = 99997 |income9 = 99998 | income9= 99999) then winc9 = .; else winc9 = income9; if (income10 = 99997 | income10 = 99998 | income10 = 99999)then winc10 = .; else winc10 = income10; wincome = sum (of winc1-winc10)/10000; label wincome = 'Wife_s income in past 12 months'; if wincome = . then wincomt = 1; if 0 < wincome < 50000 then wincomt = 1; if 50000< wincome < 100000 then wincomt = 2; if 100000< wincome < 150000 then wincomt = 3; if 150000 < wincome then wincomt = 4; /* Index of opportunity cost */ wifework = sum (wlevel, treginww, wnjobs, wincomt); /* Questions 21,22 at Page 9 */ if q21=1 then cultivat=1; else cultivat=0; label cultivat='HH cultivates some land'; farm = cultivat; label farm = 'HH cultivates land'; areacult=q21_1; label areacult='Area of land cultivated'; flandown = q22; if q21 = 2 then flandown = 0; if q22 = 999 then flandown = .; label flandown = 'Land owned by family'; irrlown=q22_1; label irrlown='area irrigated'; /* Questions 22, 23 at Page 10 */ if q22_5=2 then rentolan=1; else rentolan=0; label rentolan='rent any land to others'; tsalcrop=sold1+sold2+sold3; label tsalcrop='total sales of crop'; if crop1 ne 1 | crop2 ne 1 | crop3 ne 1 then percrice=0; if crop1 = 1 | crop2 ne 1 | crop3 ne 1 then percrice=sold1/tsalcrop*100; if crop1 ne 1 | crop2 = 1 | crop3 ne 1 then percrice=sold2/tsalcrop*100; if crop1 ne 1 | crop2 ne 1 | crop3 = 1 then percrice=sold3/tsalcrop*100; label percrice='% of rice sales out of total'; if crop1 ne 2 | crop2 ne 2 | crop3 ne 2 then percsug=0; if crop1 = 2 | crop2 ne 2 | crop3 ne 2 then percsug=sold1/tsalcrop*100; if crop1 ne 2 | crop2 = 2 | crop3 ne 2 then percsug=sold2/tsalcrop*100; if crop1 ne 2 | crop2 ne 2 | crop3 = 2 then percsug=sold3/tsalcrop*100; label percsug='% of sugar cane sales out of total'; if crop1 ne 3 | crop2 ne 3 | crop3 ne 3 then perctap=0; if crop1 = 3 | crop2 ne 3 | crop3 ne 3 then perctap=sold1/tsalcrop*100; if crop1 ne 3 | crop2 = 3 | crop3 ne 3 then perctap=sold2/tsalcrop*100; if crop1 ne 3 | crop2 ne 3 | crop3 = 3 then perctap=sold3/tsalcrop*100; label perctap='% of tapioca sales out of total'; if crop1 ne 4 | crop2 ne 4 | crop3 ne 4 then perctob=0; if crop1 = 4 | crop2 ne 4 | crop3 ne 4 then perctob=sold1/tsalcrop*100; if crop1 ne 4 | crop2 = 4 | crop3 ne 4 then perctob=sold2/tsalcrop*100; if crop1 ne 4 | crop2 ne 4 | crop3 = 4 then perctob=sold3/tsalcrop*100; label perctob='% of tobacco sales out of total'; percoth=100-percrice-percsug-perctap-perctob; label percoth='% of other sales out of total'; /* Question 24 Page 11 */ if q24=1 then livestoc=1; else livestoc=0; if cows ne . then ncows=cows; else ncows=0; if buffalo ne . then nbuf=buffalo; else nbuf=0; label nbuf='no. of buffalo'; if pigs ne . then npig=pigs; else npig=0; if geese ne . then ngeese=geese; else ngeese=0; if ducks ne . then nducks=ducks; else nducks=0; if hens ne . then nhens=hens; else nhens=0; if other ne . then nother=other; else nother=0; /* Question 25, Page 12 */ if trade1>0 then havebus=1; else havebus=0; label havebus='have business'; bus = havebus; label bus = 'Have a business in last 12 mths'; nbus=trade1+trade2+trade3;if trade1=. then nbus=0; if trade1=1 | trade2=1 | trade3=1 then store=1;else store=0; if trade1=2 | trade2=2 | trade3=2 then restaur=1;else restaur=0; label restaur='restaurant'; if trade1=3 | trade2=3 | trade3=3 then dressbea=1;else dressbea=0; label dressbea='dressmaker/beauty salon'; if trade1=4 | trade2=4 | trade3=4 then crafts=1;else crafts=0; label crafts='handicrafts'; if trade1=5 | trade2=5 | trade3=5 then constre=1;else constre=0; label constre='construction/real estate'; if trade1=6 | trade2=6 | trade3=6 then sellcatt=1;else sellcatt=0; label sellcatt='sell cattle'; if trade1=7 | trade2=7 | trade3=7 then services=1;else services=0; if trade1=8 | trade2=8 | trade3=8 then otherbus=1;else otherbus=0; if crop1 ne 1 | crop2 = 1 | crop3 ne 1 then percrice=sold2/tsalcrop*100; if crop1 ne 1 | crop2 ne 1 | crop3 = 1 then percrice=sold3/tsalcrop*100; label percrice='% of rice sales out of total'; if crop1 ne 2 | crop2 ne 2 | crop3 ne 2 then percsug=0; if crop1 = 2 | crop2 ne 2 | crop3 ne 2 then percsug=sold1/tsalcrop*100; if crop1 ne 2 | crop2 = 2 | crop3 ne 2 then percsug=sold2/tsalcrop*100; if crop1 ne 2 | crop2 ne 2 | crop3 = 2 then percsug=sold3/tsalcrop*100; label percsug='% of sugar cane sales out of total'; if crop1 ne 3 | crop2 ne 3 | crop3 ne 3 then perctap=0; if crop1 = 3 | crop2 ne 3 | crop3 ne 3 then perctap=sold1/tsalcrop*100; if crop1 ne 3 | crop2 = 3 | crop3 ne 3 then perctap=sold2/tsalcrop*100; if crop1 ne 3 | crop2 ne 3 | crop3 = 3 then perctap=sold3/tsalcrop*100; label perctap='% of tapioca sales out of total'; if crop1 ne 4 | crop2 ne 4 | crop3 ne 4 then perctob=0; if crop1 = 4 | crop2 ne 4 | crop3 ne 4 then perctob=sold1/tsalcrop*100; if crop1 ne 4 | crop2 = 4 | crop3 ne 4 then perctob=sold2/tsalcrop*100; if crop1 ne 4 | crop2 ne 4 | crop3 = 4 then perctob=sold3/tsalcrop*100; label perctob='% of tobacco sales out of total'; percoth=100-percrice-percsug-perctap-perctob; label percoth='% of other sales out of total'; /* Question 24 Page 11 */ if q24=1 then livestoc=1; else livestoc=0; if cows ne . then ncows=cows; else ncows=0; if buffalo ne . then nbuf=buffalo; else nbuf=0; label nbuf='no. of buffalo'; if pigs ne . then npig=pigs; else npig=0; if geese ne . then ngeese=geese; else ngeese=0; if ducks ne . then nducks=ducks; else nducks=0; if hens ne . then nhens=hens; else nhens=0; if other ne . then nother=other; else nother=0; /* Question 25, Page 12 */ if trade1>0 then havebus=1; else havebus=0; label havebus='have business'; nbus=trade1+trade2+trade3;if trade1=. then nbus=0; if trade1=1 | trade2=1 | trade3=1 then store=1;else store=0; if trade1=2 | trade2=2 | trade3=2 then restaur=1;else restaur=0; label restaur='restaurant'; if trade1=3 | trade2=3 | trade3=3 then dressbea=1;else dressbea=0; label dressbea='dressmaker/beauty salon'; if trade1=4 | trade2=4 | trade3=4 then crafts=1;else crafts=0; label crafts='handicrafts'; if trade1=5 | trade2=5 | trade3=5 then constre=1;else constre=0; label constre='construction/real estate'; if trade1=6 | trade2=6 | trade3=6 then sellcatt=1;else sellcatt=0; label sellcatt='sell cattle'; if trade1=7 | trade2=7 | trade3=7 then services=1;else services=0; if trade1=8 | trade2=8 | trade3=8 then otherbus=1;else otherbus=0; /************************************************ 1. GENERAL INFORMATION Back to the structure of the Costa rican questt. *************************************************/ /* Thai Page 13, Q 1 */ if age<=29 then agegrp=1; if 30<= age <= 34 then agegrp=2; if age >= 35 then agegrp=3; /* age = g02 in the Pinkw at Page 2, Q. 101, but it has been renamed as age in that questionnaire */ if 26<= age <=30 then agegrp1=1;else agegrp1=0; label agegrp1=' Dummy for 26<=age<=30'; if 31<= age <=35 then agegrp2=1;else agegrp2=0; label agegrp2=' Dummy for 31<=age<=35'; if 36<= age <=42 then agegrp3=1;else agegrp3=0; label agegrp3=' Dummy for 36<=age<=42'; /* Thai Page 14, Q. 9 */ g03 = wq9; /* compare with Pinkw at Page 2, Q. 104 */ if g03 = 1 then pbirth = 1; if g03 = 2 then pbirth = 0; if g03 >2 then pbirth = .; label pbirth='dummy: 1 if born here'; urbrth=0; if pbirth=0 and wq9_2 = 1 then urbrth=1; if pbirth=. and wq9_2 = 1 then urbrth=1; label urbrth='dummy urban birth'; /* The next one is not comparable for Thailand and Costa-Rica since we do not know the years in community in Thailand if pbirth=1 then yrscom=age; if pbirth=0 then yrscom=?????; label yrscom='years in community'; */ /* compare the next with g04 at Pinkw Page 2, Q. 104 */ if (wq9_2 = 1) or (wq9 = 1 and wq9_1 = 1) then wurbliv = 1; else wurbliv = 0; label wurbliv='if ever lived >6 mos. in a city'; /************************************************ UNION (MARRIAGES) ************************************************/ /* Thai Page 14, Q. 8 */ u02 = wq8; /* compare with Pinkw at Page 3, Q. 202 */ if u02>90 then u02=. ; wagefm=u02; if wq8 < 50 then wagefm=wq8;else wagefm=.; label wagefm='age at first union'; wyearsm=age-wagefm; label wyearsm='years married'; agediff = mage - age; label agediff = 'Age difference between husband and wife'; /* Page 13, Q. 3, 6 */ u07 = edu; /* compare with Pinkw at Page 3, Q. 207) */ yeducw = u07; label yeducw='years educ of wife'; if edu= 0 then wnosch = 1; else wnosch = 0; label wnosch='wife: 1 if no school'; if 0< edu <= 3 then w0_3edu = 1; else w0_3edu = 0; label w0_3edu = 'Wife: educn = between 0-3 yrs'; if 0< edu <= 6 then wprim = 1; else wprim = 0; label wprim = 'Wife: educn = between 0-6 yrs'; if 3< edu <=6 then w3_6edu=1;else w3_6edu=0; label w3_6edu= 'Wife: edn = betw 3-6 yrs'; if 60 then f01 = 1; else f01 = 2; /* compare with Pinkw at Pg.3, Q. 301 */ f01a = dc; if dc >= 1 then dchild=1; else dchild=0; label dchild='live born children who died'; ndchild=f01a; if f01a=. | f01a >= 10 then f01a=0; label ndchild='No of living children who died'; f03a = ceb; /* compare with Pinkw at Pg.3, Q. 301 */ ceb2 = ceb * ceb; label ceb2 = 'ceb*ceb'; /* lbchild=f03a; label lbchild='total live born children'; There seems to be no difference between lbchild and cebw */ cebw=f03a; label cebw='No. of living children even born to wife'; f03b = mceb; f03c = fceb; dfm = fceb - mceb; label dfm = 'desired fertility of male children'; /************************************************ 4. DATA ON LIVING CHILDREN ************************************************/ /* Thai Page 19, Q. 19, Page 20, Q. 20 */ c00 = lc; /* compare with Pinkw at Page 6a, Q. ...*/ surchild=lc; nlchild=c00; label nlchild='No. of living chldn'; label flc = 'no. of living female children'; label mlc = 'no. of living male children'; if flc > mlc then morefem = 1; else morefem = 0; if flc < mlc then moremal = 1; else moremal = 0; if flc = mlc then eq_chld = 1; else eq_chld = 0; if c00<5 then children=c00; if 49 then children=7; label children='No. of children category'; if c00=0 then child0=1; else child0=0; label child0='zero children'; if c00=1 then child1=1; else child1=0; label child1='one child'; if c00=2 then child2=1; else child2=0; label child2='two children'; if c00=3 then child3=1; else child3=0; label child3='three children'; if c00=4 then child4=1; else child4=0; label child4='four children'; if 49 then child10=1; else child10=0; label child10='ten or more children'; if age ne wagefm then fertil=(nlchild)/(age - wagefm); else fertil=.; label fertil='No. of chldn per year after marr'; /* compare with Pinkw at Page 6a, Q. ...*/ /* check the next codes if col7 = 1, then co4a = col9; if col7 = 2, then co4a = col12; if col7 = 3, then col4a = 0;*/ /* based on incomes in the occupation */ if co11a = 18 then co11ai = 0; if co11a = 2 | co11a =4 | co11a = 7 then co11ai = 1; label co11ai = 'Level of income of children = 1'; if co11a = 1 | co11a =8 | co11a = 9 | co11a = 12 | co11a = 14 | co11a = 16 | co11a = 17 | co11a = 80 | co11a = 97 then co11ai = 2; if co11a = 3 | co11a = 6 | co11a = 11 | co11a = 13 | co11a = 15 then co11ai = 3; if co11a = 5 | co11a = 10 | co11a = 95 then co11ai = 3; if co11a = 55 | co11a = 66 | co11a = 77 | co11a = 99 then co11ai = .; if co11b = 18 then co11bi = 0; if co11b = 2 | co11b =4 | co11b = 7 then co11bi = 1; label co11bi = 'Level of income of children = 1'; if co11b = 1 | co11b =8 | co11b = 9 | co11b = 12 | co11b = 14 | co11b = 16 | co11b = 17 | co11b = 80 | co11b = 97 then co11bi = 2; if co11b = 3 | co11b = 6 | co11b = 11 | co11b = 13 | co11b = 15 then co11bi = 3; if co11b = 5 | co11b = 10 | co11b = 95 then co11bi = 3; if co11b = 55 | co11b = 66 | co11b = 77 | co11b = 99 then co11bi = .; if co11c = 18 then co11ci = 0; if co11c = 2 | co11c =4 | co11c = 7 then co11ci = 1; label co11ci = 'Level of income of children = 1'; if co11c = 1 | co11c =8 | co11c = 9 | co11c = 12 | co11c = 14 | co11c = 16 | co11c = 17 | co11c = 80 | co11c = 97 then co11ci = 2; if co11c = 3 | co11c = 6 | co11c = 11 | co11c = 13 | co11c = 15 then co11ci = 3; if co11c = 5 | co11c = 10 | co11c = 95 then co11ci = 3; if co11c = 55 | co11c = 66 | co11c = 77 | co11c = 99 then co11ci = .; if co11d = 18 then co11di = 0; if co11d = 2 | co11d =4 | co11d = 7 then co11di = 1; label co11di = 'Level of income of children = 1'; if co11d = 1 | co11d =8 | co11d = 9 | co11d = 12 | co11d = 14 | co11d = 16 | co11d = 17 | co11d = 80 | co11d = 97 then co11di = 2; if co11d = 3 | co11d = 6 | co11d = 11 | co11d = 13 | co11d = 15 then co11di = 3; if co11d = 5 | co11d = 10 | co11d = 95 then co11di = 3; if co11d = 55 | co11d = 66 | co11d = 77 | co11d = 99 then co11di = .; if co11e = 18 then co11ei = 0; if co11e = 2 | co11e =4 | co11e = 7 then co11ei = 1; label co11ei = 'Level of income of children = 1'; if co11e = 1 | co11e =8 | co11e = 9 | co11e = 12 | co11e = 14 | co11e = 16 | co11e = 17 | co11e = 80 | co11e = 97 then co11ei = 2; if co11e = 3 | co11e = 6 | co11e = 11 | co11e = 13 | co11e = 15 then co11ei = 3; if co11e = 5 | co11e = 10 | co11e = 95 then co11ei = 3; if co11e = 55 | co11e = 66 | co11e = 77 | co11e = 99 then co11ei = .; if co11f = 18 then co11fi = 0; if co11f = 2 | co11f =4 | co11f = 7 then co11fi = 1; label co11fi = 'Level of income of children = 1'; if co11f = 1 | co11f =8 | co11f = 9 | co11f = 12 | co11f = 14 | co11f = 16 | co11f = 17 | co11f = 80 | co11f = 97 then co11fi = 2; if co11f = 3 | co11f = 6 | co11f = 11 | co11f = 13 | co11f = 15 then co11fi = 3; if co11f = 5 | co11f = 10 | co11f = 95 then co11fi = 3; if co11f = 55 | co11f = 66 | co11f = 77 | co11f = 99 then co11fi = .; if co11g = 18 then co11gi = 0; if co11g = 2 | co11g =4 | co11g = 7 then co11gi = 1; label co11gi = 'Level of income of children = 1'; if co11g = 1 | co11g =8 | co11g = 9 | co11g = 12 | co11g = 14 | co11g = 16 | co11g = 17 | co11g = 80 | co11g = 97 then co11gi = 2; if co11g = 3 | co11g = 6 | co11g = 11 | co11g = 13 | co11g = 15 then co11gi = 3; if co11g = 5 | co11g = 10 | co11g = 95 then co11gi = 3; if co11g = 55 | co11g = 66 | co11g = 77 | co11g = 99 then co11gi = .; if co11h = 18 then co11hi = 0; if co11h = 2 | co11h =4 | co11h = 7 then co11hi = 1; label co11hi = 'Level of income of children = 1'; if co11h = 1 | co11h =8 | co11h = 9 | co11h = 12 | co11h = 14 | co11h = 16 | co11h = 17 | co11h = 80 | co11h = 97 then co11hi = 2; if co11h = 3 | co11h = 6 | co11h = 11 | co11h = 13 | co11h = 15 then co11hi = 3; if co11h = 5 | co11h = 10 | co11h = 95 then co11hi = 3; if co11h = 55 | co11h = 66 | co11h = 77 | co11h = 99 then co11hi = .; if co11i = 18 then co11ii = 0; if co11i = 2 | co11i =4 | co11i = 7 then co11ii = 1; label co11ii = 'Level of income of children = 1'; if co11i = 1 | co11i =8 | co11i = 9 | co11i = 12 | co11i = 14 | co11i = 16 | co11i = 17 | co11i = 80 | co11i = 97 then co11ii = 2; if co11i = 3 | co11i = 6 | co11i = 11 | co11i = 13 | co11i = 15 then co11ii = 3; if co11i = 5 | co11i = 10 | co11i = 95 then co11ii = 3; if co11i = 55 | co11i = 66 | co11i = 77 | co11i = 99 then co11ii = .; if co11j = 18 then co11ji = 0; if co11j = 2 | co11j =4 | co11j = 7 then co11ji = 1; label co11ji = 'Level of income of children = 1'; if co11j = 1 | co11j =8 | co11j = 9 | co11j = 12 | co11j = 14 | co11j = 16 | co11j = 17 | co11j = 80 | co11j = 97 then co11ji = 2; if co11j = 3 | co11j = 6 | co11j = 11 | co11j = 13 | co11j = 15 then co11ji = 3; if co11j = 5 | co11j = 10 | co11j = 95 then co11ji = 3; if co11j = 55 | co11j = 66 | co11j = 77 | co11j = 99 then co11ji = .; if co11k = 18 then co11ki = 0; if co11k = 2 | co11k =4 | co11k = 7 then co11ki = 1; label co11ki = 'Level of income of children = 1'; if co11k = 1 | co11k =8 | co11k = 9 | co11k = 12 | co11k = 14 | co11k = 16 | co11k = 17 | co11k = 80 | co11k = 97 then co11ki = 2; if co11k = 3 | co11k = 6 | co11k = 11 | co11k = 13 | co11k = 15 then co11ki = 3; if co11k = 5 | co11k = 10 | co11k = 95 then co11ki = 3; if co11k = 55 | co11k = 66 | co11k = 77 | co11k = 99 then co11ki = .; if co11l = 2 | co11l =4 | co11l = 7 then co11li = 1; label co11li = 'Level of income of children = 1'; if co11l = 1 | co11l =8 | co11l = 9 | co11l = 12 | co11l = 14 | co11l = 16 | co11l = 17 | co11l = 80 | co11l = 97 then co11li = 2; if co11l = 3 | co11l = 6 | co11l = 11 | co11l = 13 | co11l = 15 then co11li = 3; if co11l = 5 | co11l = 10 | co11l = 95 then co11li = 3; if co11l = 55 | co11l = 66 | co11l = 77 | co11l = 99 then co11li = .; /* based on security of occupation */ if co11a = 2 | co11a = 18 then co11as = 0; label co11as = 'Security of occ. of children = 1'; if co11a = 1 | co11a =3 | co11a = 4 | co11a = 8 | co11a = 17 then co11as = 1; if co11a = 5 | co11a = 7 | co11a = 16 | co11a = 80 | co11a = 97 then co11as = 2; if co11a = 6 | co11a = 9 | co11a = 11 | co11a = 14 | co11a = 16 then co11as = 3; if co11a = 10 | co11a = 12 | co11a = 13 | co11a = 15 | co11a = 95 then co11as = 4; if co11a = 55 | co11a = 66 | co11a = 77 | co11a = 99 then co11as = .; if co11b = 2 | co11b = 18 then co11bs = 0; label co11bs = 'Security of occ. of children = 1'; if co11b = 1 | co11b =3 | co11b = 4 | co11b = 8 | co11b = 17 then co11bs = 1; if co11b = 5 | co11b = 7 | co11b = 16 | co11b = 80 | co11b = 97 then co11bs = 2; if co11b = 6 | co11b = 9 | co11b = 11 | co11b = 14 | co11b = 16 then co11bs = 3; if co11b = 10 | co11b = 12 | co11b = 13 | co11b = 15 | co11b = 95 then co11bs = 4; if co11b = 55 | co11b = 66 | co11b = 77 | co11b = 99 then co11bs = .; if co11c = 2 | co11c = 18 then co11cs = 0; label co11cs = 'Security of occ. of children = 1'; if co11c = 1 | co11c =3 | co11c = 4 | co11c = 8 | co11c = 17 then co11cs = 1; if co11c = 5 | co11c = 7 | co11c = 16 | co11c = 80 | co11c = 97 then co11cs = 2; if co11c = 6 | co11c = 9 | co11c = 11 | co11c = 14 | co11c = 16 then co11cs = 3; if co11c = 10 | co11c = 12 | co11c = 13 | co11c = 15 | co11c = 95 then co11cs = 4; if co11c = 55 | co11c = 66 | co11c = 77 | co11c = 99 then co11cs = .; if co11d = 2 | co11d = 18 then co11ds = 0; label co11ds = 'Security of occ. of children = 1'; if co11d = 1 | co11d =3 | co11d = 4 | co11d = 8 | co11d = 17 then co11ds = 1; if co11d = 5 | co11d = 7 | co11d = 16 | co11d = 80 | co11d = 97 then co11ds = 2; if co11d = 6 | co11d = 9 | co11d = 11 | co11d = 14 | co11d = 16 then co11ds = 3; if co11d = 10 | co11d = 12 | co11d = 13 | co11d = 15 | co11d = 95 then co11ds = 4; if co11d = 55 | co11d = 66 | co11d = 77 | co11d = 99 then co11ds = .; if co11e = 2 | co11e = 18 then co11es = 0; label co11es = 'Security of occ. of children = 1'; if co11e = 1 | co11e =3 | co11e = 4 | co11e = 8 | co11e = 17 then co11es = 1; if co11e = 5 | co11e = 7 | co11e = 16 | co11e = 80 | co11e = 97 then co11es = 2; if co11e = 6 | co11e = 9 | co11e = 11 | co11e = 14 | co11e = 16 then co11es = 3; if co11e = 10 | co11e = 12 | co11e = 13 | co11e = 15 | co11e = 95 then co11es = 4; if co11e = 55 | co11e = 66 | co11e = 77 | co11e = 99 then co11es = .; if co11f = 2 | co11f = 18 then co11fs = 0; label co11fs = 'Security of occ. of children = 1'; if co11f = 1 | co11f =3 | co11f = 4 | co11f = 8 | co11f = 17 then co11fs = 1; if co11f = 5 | co11f = 7 | co11f = 16 | co11f = 80 | co11f = 97 then co11fs = 2; if co11f = 6 | co11f = 9 | co11f = 11 | co11f = 14 | co11f = 16 then co11fs = 3; if co11f = 10 | co11f = 12 | co11f = 13 | co11f = 15 | co11f = 95 then co11fs = 4; if co11f = 55 | co11f = 66 | co11f = 77 | co11f = 99 then co11fs = .; if co11g = 2 | co11g = 18 then co11gs = 0; label co11gs = 'Security of occ. of children = 1'; if co11g = 1 | co11g =3 | co11g = 4 | co11g = 8 | co11g = 17 then co11gs = 1; if co11g = 5 | co11g = 7 | co11g = 16 | co11g = 80 | co11g = 97 then co11gs = 2; if co11g = 6 | co11g = 9 | co11g = 11 | co11g = 14 | co11g = 16 then co11gs = 3; if co11g = 10 | co11g = 12 | co11g = 13 | co11g = 15 | co11g = 95 then co11gs = 4; if co11g = 55 | co11g = 66 | co11g = 77 | co11g = 99 then co11gs = .; if co11h = 2 | co11h = 18 then co11hs = 0; label co11hs = 'Security of occ. of children = 1'; if co11h = 1 | co11h =3 | co11h = 4 | co11h = 8 | co11h = 17 then co11hs = 1; if co11h = 5 | co11h = 7 | co11h = 16 | co11h = 80 | co11h = 97 then co11hs = 2; if co11h = 6 | co11h = 9 | co11h = 11 | co11h = 14 | co11h = 16 then co11hs = 3; if co11h = 10 | co11h = 12 | co11h = 13 | co11h = 15 | co11h = 95 then co11hs = 4; if co11h = 55 | co11h = 66 | co11h = 77 | co11h = 99 then co11hs = .; if co11i = 2 | co11i = 18 then co11is = 0; label co11is = 'Security of occ. of children = 1'; if co11i = 1 | co11i =3 | co11i = 4 | co11i = 8 | co11i = 17 then co11is = 1; if co11i = 5 | co11i = 7 | co11i = 16 | co11i = 80 | co11i = 97 then co11is = 2; if co11i = 6 | co11i = 9 | co11i = 11 | co11i = 14 | co11i = 16 then co11is = 3; if co11i = 10 | co11i = 12 | co11i = 13 | co11i = 15 | co11i = 95 then co11is = 4; if co11i = 55 | co11i = 66 | co11i = 77 | co11i = 99 then co11is = .; if co11j = 2 | co11j = 18 then co11js = 0; label co11js = 'Security of occ. of children = 1'; if co11j = 1 | co11j =3 | co11j = 4 | co11j = 8 | co11j = 17 then co11js = 1; if co11j = 5 | co11j = 7 | co11j = 16 | co11j = 80 | co11j = 97 then co11js = 2; if co11j = 6 | co11j = 9 | co11j = 11 | co11j = 14 | co11j = 16 then co11js = 3; if co11j = 10 | co11j = 12 | co11j = 13 | co11j = 15 | co11j = 95 then co11js = 4; if co11j = 55 | co11j = 66 | co11j = 77 | co11j = 99 then co11js = .; if co11k = 2 | co11k = 18 then co11ks = 0; label co11ks = 'Security of occ. of children = 1'; if co11k = 1 | co11k =3 | co11k = 4 | co11k = 8 | co11k = 17 then co11ks = 1; if co11k = 5 | co11k = 7 | co11k = 16 | co11k = 80 | co11k = 97 then co11ks = 2; if co11k = 6 | co11k = 9 | co11k = 11 | co11k = 14 | co11k = 16 then co11ks = 3; if co11k = 10 | co11k = 12 | co11k = 13 | co11k = 15 | co11k = 95 then co11ks = 4; if co11k = 55 | co11k = 66 | co11k = 77 | co11k = 99 then co11ks = .; if co11l = 2 | co11l = 18 then co11ls = 0; label co11ls = 'Security of occ. of children = 1'; if co11l = 1 | co11l =3 | co11l = 4 | co11l = 8 | co11l = 17 then co11ls = 1; if co11l = 5 | co11l = 7 | co11l = 16 | co11l = 80 | co11l = 97 then co11ls = 2; if co11l = 6 | co11l = 9 | co11l = 11 | co11l = 14 | co11l = 16 then co11ls = 3; if co11l = 10 | co11l = 12 | co11l = 13 | co11l = 15 | co11l = 95 then co11ls = 4; if co11l = 55 | co11l = 66 | co11l = 77 | co11l = 99 then co11ls = .; co11inc = sum(co11ai, co11bi, co11ci, co11di, co11ei, co11fi, co11gi, co11hi, co11ii, co11ji, co11ki, co11li); co11sec = sum (co11as, co11bs, co11cs, co11ds, co11es, co11fs, co11gs, co11hs, co11is, co11js, co11ks, co11ls); if co11ai ne . then co11aic= 1; else co11aic = 0; if co11bi ne . then co11bic= 1; else co11bic = 0; if co11ci ne . then co11cic= 1; else co11cic = 0; if co11di ne . then co11dic= 1; else co11dic = 0; if co11ei ne . then co11eic= 1; else co11eic = 0; if co11fi ne . then co11fic= 1; else co11fic = 0; if co11gi ne . then co11gic= 1; else co11gic = 0; if co11hi ne . then co11hic= 1; else co11hic = 0; if co11ii ne . then co11iic= 1; else co11iic = 0; if co11ji ne . then co11jic= 1; else co11jic = 0; if co11ki ne . then co11kic= 1; else co11kic = 0; if co11li ne . then co11lic= 1; else co11lic = 0; if co11as ne . then co11asc= 1; else co11asc = 0; if co11bs ne . then co11bsc= 1; else co11bsc = 0; if co11cs ne . then co11csc= 1; else co11csc = 0; if co11ds ne . then co11dsc= 1; else co11dsc = 0; if co11es ne . then co11esc= 1; else co11esc = 0; if co11fs ne . then co11fsc= 1; else co11fsc = 0; if co11gs ne . then co11gsc= 1; else co11gsc = 0; if co11hs ne . then co11hsc= 1; else co11hsc = 0; if co11is ne . then co11isc= 1; else co11isc = 0; if co11js ne . then co11jsc= 1; else co11jsc = 0; if co11ks ne . then co11ksc= 1; else co11ksc = 0; if co11ls ne . then co11lsc= 1; else co11lsc = 0; co11incc = sum(co11aic, co11bic, co11cic, co11dic, co11eic, co11fic, co11gic, co11hic, co11iic, co11jic, co11kic, co11lic); label co11incc = 'Count of children col. 11'; co11secc = sum (co11asc, co11bsc, co11csc, co11dsc, co11esc, co11fsc, co11gsc, co11hsc, co11isc, co11jsc, co11ksc, co11lsc); label co11secc = 'Count of children col.16'; /* based on expectations of income */ if co16a = 18 then co16ai = 0; if co16a = 2 | co16a =4 | co16a = 7 then co16ai = 1; label co16ai = 'Level of income of children = 1'; if co16a = 1 | co16a =8 | co16a = 9 | co16a = 12 | co16a = 14 | co16a = 16 | co16a = 17 | co16a = 80 | co16a = 97 then co16ai = 2; if co16a = 3 | co16a = 6 | co16a = 16 | co16a = 13 | co16a = 15 then co16ai = 3; if co16a = 5 | co16a = 10 | co16a = 95 then co16ai = 3; if co16a = 55 | co16a = 66 | co16a = 77 | co16a = 99 then co16ai = .; if co16b = 18 then co16bi = 0; if co16b = 2 | co16b =4 | co16b = 7 then co16bi = 1; label co16bi = 'Level of income of children = 1'; if co16b = 1 | co16b =8 | co16b = 9 | co16b = 12 | co16b = 14 | co16b = 16 | co16b = 17 | co16b = 80 | co16b = 97 then co16bi = 2; if co16b = 3 | co16b = 6 | co16b = 16 | co16b = 13 | co16b = 15 then co16bi = 3; if co16b = 5 | co16b = 10 | co16b = 95 then co16bi = 3; if co16b = 55 | co16b = 66 | co16b = 77 | co16b = 99 then co16bi = .; if co16c = 18 then co16ci = 0; if co16c = 2 | co16c =4 | co16c = 7 then co16ci = 1; label co16ci = 'Level of income of children = 1'; if co16c = 1 | co16c =8 | co16c = 9 | co16c = 12 | co16c = 14 | co16c = 16 | co16c = 17 | co16c = 80 | co16c = 97 then co16ci = 2; if co16c = 3 | co16c = 6 | co16c = 16 | co16c = 13 | co16c = 15 then co16ci = 3; if co16c = 5 | co16c = 10 | co16c = 95 then co16ci = 3; if co16c = 55 | co16c = 66 | co16c = 77 | co16c = 99 then co16ci = .; if co16d = 18 then co16di = 0; if co16d = 2 | co16d =4 | co16d = 7 then co16di = 1; label co16di = 'Level of income of children = 1'; if co16d = 1 | co16d =8 | co16d = 9 | co16d = 12 | co16d = 14 | co16d = 16 | co16d = 17 | co16d = 80 | co16d = 97 then co16di = 2; if co16d = 3 | co16d = 6 | co16d = 16 | co16d = 13 | co16d = 15 then co16di = 3; if co16d = 5 | co16d = 10 | co16d = 95 then co16di = 3; if co16d = 55 | co16d = 66 | co16d = 77 | co16d = 99 then co16di = .; if co16e = 18 then co16ei = 0; if co16e = 2 | co16e =4 | co16e = 7 then co16ei = 1; label co16ei = 'Level of income of children = 1'; if co16e = 1 | co16e =8 | co16e = 9 | co16e = 12 | co16e = 14 | co16e = 16 | co16e = 17 | co16e = 80 | co16e = 97 then co16ei = 2; if co16e = 3 | co16e = 6 | co16e = 16 | co16e = 13 | co16e = 15 then co16ei = 3; if co16e = 5 | co16e = 10 | co16e = 95 then co16ei = 3; if co16e = 55 | co16e = 66 | co16e = 77 | co16e = 99 then co16ei = .; if co16f = 18 then co16fi = 0; if co16f = 2 | co16f =4 | co16f = 7 then co16fi = 1; label co16fi = 'Level of income of children = 1'; if co16f = 1 | co16f =8 | co16f = 9 | co16f = 12 | co16f = 14 | co16f = 16 | co16f = 17 | co16f = 80 | co16f = 97 then co16fi = 2; if co16f = 3 | co16f = 6 | co16f = 16 | co16f = 13 | co16f = 15 then co16fi = 3; if co16f = 5 | co16f = 10 | co16f = 95 then co16fi = 3; if co16f = 55 | co16f = 66 | co16f = 77 | co16f = 99 then co16fi = .; if co16g = 18 then co16gi = 0; if co16g = 2 | co16g =4 | co16g = 7 then co16gi = 1; label co16gi = 'Level of income of children = 1'; if co16g = 1 | co16g =8 | co16g = 9 | co16g = 12 | co16g = 14 | co16g = 16 | co16g = 17 | co16g = 80 | co16g = 97 then co16gi = 2; if co16g = 3 | co16g = 6 | co16g = 16 | co16g = 13 | co16g = 15 then co16gi = 3; if co16g = 5 | co16g = 10 | co16g = 95 then co16gi = 3; if co16g = 55 | co16g = 66 | co16g = 77 | co16g = 99 then co16gi = .; if co16h = 18 then co16hi = 0; if co16h = 2 | co16h =4 | co16h = 7 then co16hi = 1; label co16hi = 'Level of income of children = 1'; if co16h = 1 | co16h =8 | co16h = 9 | co16h = 12 | co16h = 14 | co16h = 16 | co16h = 17 | co16h = 80 | co16h = 97 then co16hi = 2; if co16h = 3 | co16h = 6 | co16h = 16 | co16h = 13 | co16h = 15 then co16hi = 3; if co16h = 5 | co16h = 10 | co16h = 95 then co16hi = 3; if co16h = 55 | co16h = 66 | co16h = 77 | co16h = 99 then co16hi = .; if co16i = 18 then co16ii = 0; if co16i = 2 | co16i =4 | co16i = 7 then co16ii = 1; label co16ii = 'Level of income of children = 1'; if co16i = 1 | co16i =8 | co16i = 9 | co16i = 12 | co16i = 14 | co16i = 16 | co16i = 17 | co16i = 80 | co16i = 97 then co16ii = 2; if co16i = 3 | co16i = 6 | co16i = 16 | co16i = 13 | co16i = 15 then co16ii = 3; if co16i = 5 | co16i = 10 | co16i = 95 then co16ii = 3; if co16i = 55 | co16i = 66 | co16i = 77 | co16i = 99 then co16ii = .; if co16j = 18 then co16ji = 0; if co16j = 2 | co16j =4 | co16j = 7 then co16ji = 1; label co16ji = 'Level of income of children = 1'; if co16j = 1 | co16j =8 | co16j = 9 | co16j = 12 | co16j = 14 | co16j = 16 | co16j = 17 | co16j = 80 | co16j = 97 then co16ji = 2; if co16j = 3 | co16j = 6 | co16j = 16 | co16j = 13 | co16j = 15 then co16ji = 3; if co16j = 5 | co16j = 10 | co16j = 95 then co16ji = 3; if co16j = 55 | co16j = 66 | co16j = 77 | co16j = 99 then co16ji = .; if co16k = 18 then co16ki = 0; if co16k = 2 | co16k =4 | co16k = 7 then co16ki = 1; label co16ki = 'Level of income of children = 1'; if co16k = 1 | co16k =8 | co16k = 9 | co16k = 12 | co16k = 14 | co16k = 16 | co16k = 17 | co16k = 80 | co16k = 97 then co16ki = 2; if co16k = 3 | co16k = 6 | co16k = 16 | co16k = 13 | co16k = 15 then co16ki = 3; if co16k = 5 | co16k = 10 | co16k = 95 then co16ki = 3; if co16k = 55 | co16k = 66 | co16k = 77 | co16k = 99 then co16ki = .; if co16l = 2 | co16l =4 | co16l = 7 then co16li = 1; label co16li = 'Level of income of children = 1'; if co16l = 1 | co16l =8 | co16l = 9 | co16l = 12 | co16l = 14 | co16l = 16 | co16l = 17 | co16l = 80 | co16l = 97 then co16li = 2; if co16l = 3 | co16l = 6 | co16l = 16 | co16l = 13 | co16l = 15 then co16li = 3; if co16l = 5 | co16l = 10 | co16l = 95 then co16li = 3; if co16l = 55 | co16l = 66 | co16l = 77 | co16l = 99 then co16li = .; /* based on security of occupation */ if co16a = 2 | co16a = 18 then co16as = 0; label co16as = 'Security of occ. of children = 1'; if co16a = 1 | co16a =3 | co16a = 4 | co16a = 8 | co16a = 17 then co16as = 1; if co16a = 5 | co16a = 7 | co16a = 16 | co16a = 80 | co16a = 97 then co16as = 2; if co16a = 6 | co16a = 9 | co16a = 16 | co16a = 14 | co16a = 16 then co16as = 3; if co16a = 10 | co16a = 12 | co16a = 13 | co16a = 15 | co16a = 95 then co16as = 4; if co16a = 55 | co16a = 66 | co16a = 77 | co16a = 99 then co16as = .; if co16b = 2 | co16b = 18 then co16bs = 0; label co16bs = 'Security of occ. of children = 1'; if co16b = 1 | co16b =3 | co16b = 4 | co16b = 8 | co16b = 17 then co16bs = 1; if co16b = 5 | co16b = 7 | co16b = 16 | co16b = 80 | co16b = 97 then co16bs = 2; if co16b = 6 | co16b = 9 | co16b = 16 | co16b = 14 | co16b = 16 then co16bs = 3; if co16b = 10 | co16b = 12 | co16b = 13 | co16b = 15 | co16b = 95 then co16bs = 4; if co16b = 55 | co16b = 66 | co16b = 77 | co16b = 99 then co16bs = .; if co16c = 2 | co16c = 18 then co16cs = 0; label co16cs = 'Security of occ. of children = 1'; if co16c = 1 | co16c =3 | co16c = 4 | co16c = 8 | co16c = 17 then co16cs = 1; if co16c = 5 | co16c = 7 | co16c = 16 | co16c = 80 | co16c = 97 then co16cs = 2; if co16c = 6 | co16c = 9 | co16c = 16 | co16c = 14 | co16c = 16 then co16cs = 3; if co16c = 10 | co16c = 12 | co16c = 13 | co16c = 15 | co16c = 95 then co16cs = 4; if co16c = 55 | co16c = 66 | co16c = 77 | co16c = 99 then co16cs = .; if co16d = 2 | co16d = 18 then co16ds = 0; label co16ds = 'Security of occ. of children = 1'; if co16d = 1 | co16d =3 | co16d = 4 | co16d = 8 | co16d = 17 then co16ds = 1; if co16d = 5 | co16d = 7 | co16d = 16 | co16d = 80 | co16d = 97 then co16ds = 2; if co16d = 6 | co16d = 9 | co16d = 16 | co16d = 14 | co16d = 16 then co16ds = 3; if co16d = 10 | co16d = 12 | co16d = 13 | co16d = 15 | co16d = 95 then co16ds = 4; if co16d = 55 | co16d = 66 | co16d = 77 | co16d = 99 then co16ds = .; if co16e = 2 | co16e = 18 then co16es = 0; label co16es = 'Security of occ. of children = 1'; if co16e = 1 | co16e =3 | co16e = 4 | co16e = 8 | co16e = 17 then co16es = 1; if co16e = 5 | co16e = 7 | co16e = 16 | co16e = 80 | co16e = 97 then co16es = 2; if co16e = 6 | co16e = 9 | co16e = 16 | co16e = 14 | co16e = 16 then co16es = 3; if co16e = 10 | co16e = 12 | co16e = 13 | co16e = 15 | co16e = 95 then co16es = 4; if co16e = 55 | co16e = 66 | co16e = 77 | co16e = 99 then co16es = .; if co16f = 2 | co16f = 18 then co16fs = 0; label co16fs = 'Security of occ. of children = 1'; if co16f = 1 | co16f =3 | co16f = 4 | co16f = 8 | co16f = 17 then co16fs = 1; if co16f = 5 | co16f = 7 | co16f = 16 | co16f = 80 | co16f = 97 then co16fs = 2; if co16f = 6 | co16f = 9 | co16f = 16 | co16f = 14 | co16f = 16 then co16fs = 3; if co16f = 10 | co16f = 12 | co16f = 13 | co16f = 15 | co16f = 95 then co16fs = 4; if co16f = 55 | co16f = 66 | co16f = 77 | co16f = 99 then co16fs = .; if co16g = 2 | co16g = 18 then co16gs = 0; label co16gs = 'Security of occ. of children = 1'; if co16g = 1 | co16g =3 | co16g = 4 | co16g = 8 | co16g = 17 then co16gs = 1; if co16g = 5 | co16g = 7 | co16g = 16 | co16g = 80 | co16g = 97 then co16gs = 2; if co16g = 6 | co16g = 9 | co16g = 16 | co16g = 14 | co16g = 16 then co16gs = 3; if co16g = 10 | co16g = 12 | co16g = 13 | co16g = 15 | co16g = 95 then co16gs = 4; if co16g = 55 | co16g = 66 | co16g = 77 | co16g = 99 then co16gs = .; if co16h = 2 | co16h = 18 then co16hs = 0; label co16hs = 'Security of occ. of children = 1'; if co16h = 1 | co16h =3 | co16h = 4 | co16h = 8 | co16h = 17 then co16hs = 1; if co16h = 5 | co16h = 7 | co16h = 16 | co16h = 80 | co16h = 97 then co16hs = 2; if co16h = 6 | co16h = 9 | co16h = 16 | co16h = 14 | co16h = 16 then co16hs = 3; if co16h = 10 | co16h = 12 | co16h = 13 | co16h = 15 | co16h = 95 then co16hs = 4; if co16h = 55 | co16h = 66 | co16h = 77 | co16h = 99 then co16hs = .; if co16i = 2 | co16i = 18 then co16is = 0; label co16is = 'Security of occ. of children = 1'; if co16i = 1 | co16i =3 | co16i = 4 | co16i = 8 | co16i = 17 then co16is = 1; if co16i = 5 | co16i = 7 | co16i = 16 | co16i = 80 | co16i = 97 then co16is = 2; if co16i = 6 | co16i = 9 | co16i = 16 | co16i = 14 | co16i = 16 then co16is = 3; if co16i = 10 | co16i = 12 | co16i = 13 | co16i = 15 | co16i = 95 then co16is = 4; if co16i = 55 | co16i = 66 | co16i = 77 | co16i = 99 then co16is = .; if co16j = 2 | co16j = 18 then co16js = 0; label co16js = 'Security of occ. of children = 1'; if co16j = 1 | co16j =3 | co16j = 4 | co16j = 8 | co16j = 17 then co16js = 1; if co16j = 5 | co16j = 7 | co16j = 16 | co16j = 80 | co16j = 97 then co16js = 2; if co16j = 6 | co16j = 9 | co16j = 16 | co16j = 14 | co16j = 16 then co16js = 3; if co16j = 10 | co16j = 12 | co16j = 13 | co16j = 15 | co16j = 95 then co16js = 4; if co16j = 55 | co16j = 66 | co16j = 77 | co16j = 99 then co16js = .; if co16k = 2 | co16k = 18 then co16ks = 0; label co16ks = 'Security of occ. of children = 1'; if co16k = 1 | co16k =3 | co16k = 4 | co16k = 8 | co16k = 17 then co16ks = 1; if co16k = 5 | co16k = 7 | co16k = 16 | co16k = 80 | co16k = 97 then co16ks = 2; if co16k = 6 | co16k = 9 | co16k = 16 | co16k = 14 | co16k = 16 then co16ks = 3; if co16k = 10 | co16k = 12 | co16k = 13 | co16k = 15 | co16k = 95 then co16ks = 4; if co16k = 55 | co16k = 66 | co16k = 77 | co16k = 99 then co16ks = .; if co16l = 2 | co16l = 18 then co16ls = 0; label co16ls = 'Security of occ. of children = 1'; if co16l = 1 | co16l =3 | co16l = 4 | co16l = 8 | co16l = 17 then co16ls = 1; if co16l = 5 | co16l = 7 | co16l = 16 | co16l = 80 | co16l = 97 then co16ls = 2; if co16l = 6 | co16l = 9 | co16l = 16 | co16l = 14 | co16l = 16 then co16ls = 3; if co16l = 10 | co16l = 12 | co16l = 13 | co16l = 15 | co16l = 95 then co16ls = 4; if co16l = 55 | co16l = 66 | co16l = 77 | co16l = 99 then co16ls = .; co16inc = sum(co16ai, co16bi, co16ci, co16di, co16ei, co16fi, co16gi, co16hi, co16ii, co16ji, co16ki, co16li); label co16inc = 'Sum of exp. occ. incomebased'; co16sec = sum (co16as, co16bs, co16cs, co16ds, co16es, co16fs, co16gs, co16hs, co16is, co16js, co16ks, co16ls); label co16sec = 'Sum of exp. occ. securitybased'; if co16ai ne . then co16aic= 1; else co16aic = 0; if co16bi ne . then co16bic= 1; else co16bic = 0; if co16ci ne . then co16cic= 1; else co16cic = 0; if co16di ne . then co16dic= 1; else co16dic = 0; if co16ei ne . then co16eic= 1; else co16eic = 0; if co16fi ne . then co16fic= 1; else co16fic = 0; if co16gi ne . then co16gic= 1; else co16gic = 0; if co16hi ne . then co16hic= 1; else co16hic = 0; if co16ii ne . then co16iic= 1; else co16iic = 0; if co16ji ne . then co16jic= 1; else co16jic = 0; if co16ki ne . then co16kic= 1; else co16kic = 0; if co16li ne . then co16lic= 1; else co16lic = 0; if co16as ne . then co16asc= 1; else co16asc = 0; if co16bs ne . then co16bsc= 1; else co16bsc = 0; if co16cs ne . then co16csc= 1; else co16csc = 0; if co16ds ne . then co16dsc= 1; else co16dsc = 0; if co16es ne . then co16esc= 1; else co16esc = 0; if co16fs ne . then co16fsc= 1; else co16fsc = 0; if co16gs ne . then co16gsc= 1; else co16gsc = 0; if co16hs ne . then co16hsc= 1; else co16hsc = 0; if co16is ne . then co16isc= 1; else co16isc = 0; if co16js ne . then co16jsc= 1; else co16jsc = 0; if co16ks ne . then co16ksc= 1; else co16ksc = 0; if co16ls ne . then co16lsc= 1; else co16lsc = 0; co16incc = sum(co16aic, co16bic, co16cic, co16dic, co16eic, co16fic, co16gic, co16hic, co16iic, co16jic, co16kic, co16lic); label co16incc = 'Count of children: occ. income '; co16secc = sum (co16asc, co16bsc, co16csc, co16dsc, co16esc, co16fsc, co16gsc, co16hsc, co16isc, co16jsc, co16ksc, co16lsc); label co16incc = 'Count of children: occ. security'; /* Now add these two columns together */ /* Numerator */ co11_16i = sum (co11inc, co16inc); label co11_16i = '11+16 expected occ: income based'; co11_16s = sum (co11sec, co16sec); label co11_16s = '11+16 expected occ: security based'; /* Denominator */ co1116id = sum(co11incc, co16incc); label co1116id = '11+16 no. of children incom.based'; co1116sd = sum(co11secc, co16secc); label co1116sd = '11+16 no. of children sec. based'; If co1116id ne 0 then expoccci = co11_16i / co1116id; label expoccci = 'Expected occ of chld based on income'; If co1116sd ne 0 then expocccs = co11_16s / co1116sd; label expocccs = 'Expected occ of chld based on security'; /* STUFF RELATED TO COL 10 */ /*if wq21_1a ne . then abilm = wq21_1a; else abilm = .; if wq21_1b ne . then abilf = wq21_1b; else abilf = .; abiledu = sum( abilm, abilf); label abiledu = 'If unborn child have abil. what edu?'; if co10a = 77 and abiledu ne . then col10a = abiledu; if co10b = 77 and abiledu ne . then col10b = abiledu; if co10c = 77 and abiledu ne . then col10c = abiledu; if co10d = 77 and abiledu ne . then col10d = abiledu; if co10e = 77 and abiledu ne . then col10e = abiledu; if co10f = 77 and abiledu ne . then col10f = abiledu; if co10g = 77 and abiledu ne . then col10g = abiledu; if co10h = 77 and abiledu ne . then col10h = abiledu; if co10i = 77 and abiledu ne . then col10i = abiledu; if co10j = 77 and abiledu ne . then col10j = abiledu; if co10k = 77 and abiledu ne . then col10k = abiledu; if co10l = 77 and abiledu ne . then col10l = abiledu; I have a feeling that this logic is not working properly is this value of co10a being superseded by the lines below? Is it that we are giving co10a a value of 3 (higher) by this method? to other, non abiledu cases? Something in this program is wrong */ if co10a = 98 then co10aq = .; if co10a = 0 then co10aq = 0; if 0 < co10a <= 6 then co10aq = 1; if 6 < co10a <= 12 then co10aq= 2; if 13 <= co10a < 99 then co10aq = 3; if co10b = 98 then co10bq = .; if co10b = 0 then co10bq = 0; if 0 < co10b <= 6 then co10bq = 1; if 6 < co10b <= 12 then co10bq= 2; if 13 <= co10b < 99 then co10bq = 3; if co10c = 98 then co10cq = .; if co10c = 0 then co10cq = 0; if 0 < co10c <= 6 then co10cq = 1; if 6 < co10c <= 12 then co10cq= 2; if 13 <= co10c < 99 then co10cq = 3; if co10d = 98 then co10dq = .; if co10d = 0 then co10dq = 0; if 0 < co10d <= 6 then co10dq = 1; if 6 < co10d <= 12 then co10dq= 2; if 13 <= co10d < 99 then co10dq = 3; if co10e = 98 then co10eq = .; if co10e = 0 then co10eq = 0; if 0 < co10e <= 6 then co10eq = 1; if 6 < co10e <= 12 then co10eq= 2; if 13 <= co10e < 99 then co10eq = 3; if co10f = 98 then co10fq = .; if co10f = 0 then co10fq = 0; if 0 < co10f <= 6 then co10fq = 1; if 6 < co10f <= 12 then co10fq= 2; if 13 <= co10f < 99 then co10fq = 3; if co10g = 98 then co10gq = .; if co10g = 0 then co10gq = 0; if 0 < co10g <= 6 then co10gq = 1; if 6 < co10g <= 12 then co10gq= 2; if 13 <= co10g < 99 then co10gq = 3; if co10h = 98 then co10hq = .; if co10h = 0 then co10hq = 0; if 0 < co10h <= 6 then co10hq = 1; if 6 < co10h <= 12 then co10hq= 2; if 13 <= co10h < 99 then co10hq = 3; if co10i = 98 then co10iq = .; if co10i = 0 then co10iq = 0; if 0 < co10i <= 6 then co10iq = 1; if 6 < co10i <= 12 then co10iq= 2; if 13 <= co10i < 99 then co10iq = 3; if co10j = 98 then co10jq = .; if co10j = 0 then co10jq = 0; if 0 < co10j <= 6 then co10jq = 1; if 6 < co10j <= 12 then co10jq= 2; if 13 <= co10j < 99 then co10jq = 3; if co10k = 98 then co10kq = .; if co10k = 0 then co10kq = 0; if 0 < co10k <= 6 then co10kq = 1; if 6 < co10k <= 12 then co10kq= 2; if 13 <= co10k < 99 then co10kq = 3; if co10l = 98 then co10lq = .; if co10l = 0 then co10lq = 0; if 0 < co10l <= 6 then co10lq = 1; if 6 < co10l <= 12 then co10lq= 2; if 13 <= co10l < 99 then co10lq = 3; co10qnc = sum(co10aq, co10bq, co10cq, co10dq, co10eq, co10fq, co10gq, co10hq, co10iq, co10jq, co10kq, co10lq); label co10qnc = 'total exp. edu of studying children'; if co10aq ne . then co10aqc= 1; else co10aqc = 0; if co10bq ne . then co10bqc= 1; else co10bqc = 0; if co10cq ne . then co10cqc= 1; else co10cqc = 0; if co10dq ne . then co10dqc= 1; else co10dqc = 0; if co10eq ne . then co10eqc= 1; else co10eqc = 0; if co10fq ne . then co10fqc= 1; else co10fqc = 0; if co10gq ne . then co10gqc= 1; else co10gqc = 0; if co10hq ne . then co10hqc= 1; else co10hqc = 0; if co10iq ne . then co10iqc= 1; else co10iqc = 0; if co10jq ne . then co10jqc= 1; else co10jqc = 0; if co10kq ne . then co10kqc= 1; else co10kqc = 0; if co10lq ne . then co11lqc= 1; else co10lqc = 0; co10qncc = sum(co10aqc, co10bqc, co10cqc, co10dqc, co10eqc, co10fqc, co10iqc, co10hqc, co10iqc, co10jqc, co10kqc, co10lqc); label co10qncc = 'Count of children col. 10'; if co10qncc ne 0 then expeduc = co10qnc/ co10qncc; label expeduc = 'Expected edu of studying chld'; educoccs = expeduc * expocccs; label educoccs = 'expeduc * expocccs: interaction'; /* EXPECTED YEARS OF EDUCATION OF CHILDREN: (not working, hence not considered) if co10a = 98 then co10anq = .; if co10a = 0 then co10anq = 0; if 0 < co10a <99 then co10anq = col10a; if co10b = 98 then co10bnq = .; if co10b = 0 then co10bnq = 0; if 0 < co10b <99 then co10bnq = col10b; if co10c = 98 then co10cnq = .; if co10c = 0 then co10cnq = 0; if 0 < co10c <99 then co10cnq = col10c; if co10d = 98 then co10dnq = .; if co10d = 0 then co10dnq = 0; if 0 < co10d <99 then co10dnq = col10d; if co10e = 98 then co10enq = .; if co10e = 0 then co10enq = 0; if 0 < co10e <99 then co10enq = col10e; if co10f = 98 then co10fnq = .; if co10f = 0 then co10fnq = 0; if 0 < co10f <99 then co10fnq = col10f; if co10g = 98 then co10gnq = .; if co10g = 0 then co10gnq = 0; if 0 < co10g <99 then co10gnq = col10g; if co10h = 98 then co10hnq = .; if co10h = 0 then co10hnq = 0; if 0 < co10h <99 then co10hnq = col10h; if co10i = 98 then co10inq = .; if co10i = 0 then co10inq = 0; if 0 < co10i <99 then co10inq = col10i; if co10j = 98 then co10jnq = .; if co10j = 0 then co10jnq = 0; if 0 < co10j <99 then co10jnq = col10j; if co10k = 98 then co10knq = .; if co10k = 0 then co10knq = 0; if 0 < co10k <99 then co10knq = col10k; if co10l = 98 then co10lnq = .; if co10l = 0 then co10lnq = 0; if 0 < co10l <99 then co10lnq = col10l; co10nqnc = sum(co10anq, co10bnq, co10cnq, co10dnq, co10enq, co10fnq, co10gnq, co10hnq, co10inq, co10jnq, co10knq, co10lnq); label co10nqnc = 'exp. yrs of edu of studying children'; if co10anq ne . then co10anqc= 1; else co10anqc = 0; if co10bnq ne . then co10bnqc= 1; else co10bnqc = 0; if co10cnq ne . then co10cnqc= 1; else co10cnqc = 0; if co10dnq ne . then co10dnqc= 1; else co10dnqc = 0; if co10enq ne . then co10enqc= 1; else co10enqc = 0; if co10fnq ne . then co10fnqc= 1; else co10fnqc = 0; if co10gnq ne . then co10gnqc= 1; else co10gnqc = 0; if co10hnq ne . then co10hnqc= 1; else co10hnqc = 0; if co10inq ne . then co10inqc= 1; else co10inqc = 0; if co10jnq ne . then co10jnqc= 1; else co10jnqc = 0; if co10knq ne . then co10knqc= 1; else co10knqc = 0; if co10lnq ne . then co11lnqc= 1; else co10lnqc = 0; co10nqnc = sum(co10anqc, co10bnqc, co10cnqc, co10dnqc, co10enqc, co10fnqc, co10inqc, co10hnqc, co10inqc, co10jnqc, co10knqc, co10lnqc); label co10nqnc = 'Count of children col. 10'; if co10nqnc ne 0 then expeducy = co10nqnc/ co10nqnc; label expeducy = 'Expected yrs edu of studying chld'; */ /**************************************************************** FERTILITY, FAMILY SIZE NORMS AND EDUCATION OF CHILDREN This stuff was from the Thai questionnaire exclusively ****************************************************************/ if wq21a=0 | wq21a=1 | wq21a=2 then edusexpl=1;else edusexpl=0; label edusexpl='expect sons up to grade 9'; if wq21a=3 then edusexpm=1;else edusexpm=0; label edusexpm='expect sons to grade 12/vocatnl'; if wq21a=4 then edusexph=1;else edusexph=0; label edusexph='bachelor or more'; if wq21a=5 then edusexdc=1;else edusexdc=0; label edusexdc='expect highest sons can'; if wq21a=6 then edusexdf=1;else edusexdf=0; label edusexdf='expect highest par can afford'; if wq21a=7 then edswantb=1;else edswantb=0; label edswantb='want sons to own business'; if wq21b=0 | wq21b=1 | wq21b=2 then edudexpl=1;else edudexpl=0; label edudexpl='expect daugs up to grade 9'; if wq21b=3 then edudexpm=1;else edudexpm=0; label edudexpm='expect daugs up to grade 12/vocatnl'; if wq21b=4 then edudexph=1;else edudexph=0; label edudexph='bachelor or more'; if wq21b=5 then edudexdc=1;else edudexdc=0; label edudexdc='expect highest daugs can'; if wq21b=6 then edudexdf=1;else edudexdf=0; label edudexdf='expect highest par can afford'; if wq21b=7 then eddwantb=1;else eddwantb=0; label eddwantb='want daugs to own business'; /* Questions 22, 23, 24 at p. 22 */ ceblast5=ceb2; label ceblast5='Children born last 5 years'; if wq23 < 50 then agefc=wq23;else agefc=.; label agefc='age when got first child'; aageslc=age-wq24; if 0<= aageslc< 20 then yrsslc=aageslc;else yrsslc =.; label yrsslc='years since last child'; /* Questions 25, 26 at p.23 */ if wq25a<90 then idealmas=wq25a;else idealmas=.; label idealmas='ideal marriage age of son'; if wq25b<90 then idealmad=wq25b;else idealmad=.; label idealmad='ideal marriage age of daughter'; if wq26_1a ne . then ncadopt=1;else ncadopt=0; label ncadopt='No of total adopted/step chld'; if wq26_1b ne . then nsadopt=1;else nsadopt=0; label nsadopt='No of total adopted/step sons'; if wq26_1c ne . then ndadopt=1;else ndadopt=0; label ndadopt='No of total adopted/step daugs'; adoptch=nsadopt+ndadopt; label adoptch = 'cross-check of ncadopt'; if adoptch > 0 then adopt = adoptch; else adopt = 0; compfert = sum (ceb, adopt); label compfert = 'Proxy for completed fertility'; surchadp = sum(surchild, adopt); label surchadp = 'No. of surviving chld + adopted'; /* Questions 31,32 at p.24 */ if wq31=1 then pregnant=1;else pregnant=0; if wq32=1 then stilable=1; else stilable=0; label stilable='Still able to have chld'; if wq32=2 then wunable=1; else wunable=0; label wunable='Unable to have more chld'; /* We will now correct for the cases where a woman is fertile, but her DF figures in both Q.32 and Q33 */ if (wq32 = 1 | wq32 = 3) then desire1 = .; if (wq32 = 1 | wq32 = 3) then desire2 = .; if (wq32 = 1 | wq32 = 3) then desire3 = .; if wq32=1 | wq32=3 then pstlabl1=1;else pstlabl1=0; label pstlabl1='possibly still to have chld'; if wq32_1=1 then sterile1=1;else sterile1=0; label sterile1='cant have any more chld'; /* NEW DEFINITION DUE TO INCORRECT INFO IN WQ32 */ if (wq36_1=1 | wq36_1 = 2) then steriled=1;else steriled=0; label steriled='Wife/husb sterlized'; if steriled = 0 and (wq32=1 | wq32=3) then pstlable=1;else pstlable=0; label pstlable='possibly still to have chld'; if pstlable = 1 and steriled = 1 then mixup = 1; else mixup = 0; if desire1 = . then uaddsdes=0;else uaddsdes=desire1; label uaddsdes='If unable No. added sons desired'; if desire2= . then uaddddes=0;else uaddddes=desire2; label uaddddes='If unable No. added daughters desired'; if desire3=. then uaddedes=0;else uaddedes=desire3; label uaddedes='If unable No. added son or daug desired'; /* unabkids = sum (uaddsdes, uaddddes, uaddedes); label unabkids = 'Unable: but more children desired'; */ /* THIS NEEDS TO BE CORRECTED: THERE ARE CASES WHERE THE DESIRED CHILDREN HAVE BEEN ENTERED IN BOTH Q.32 AND 33, AND SOME CASES WHERE THE DES.CHILDREN HAVE BEEN ENTERED ONLY IN Q.33 INSTEAD OF Q.32 : this is done later*/ /* if wq32_1 = 1 | wq32_1 = 5 then unabkids = 0; else unabkids = sum (uaddsdes, uaddddes, uaddedes); label unabkids = 'Unable: but more children desired'; */ /* Questions 33,34 at p.25 */ if wq33=. then naddcdes=0;else naddcdes=wq33; label naddcdes='Do you want more chldn?'; if wq33_1a=. then naddsdes=0;else naddsdes=wq33_1a; label naddsdes='If able, No. added sons desired'; if wq33_1b=. then naddddes=0;else naddddes=wq33_1b; label naddddes='If able, No. added daughters desired'; if wq33_1c=. then naddedes=0;else naddedes=wq33_1c; label naddedes='If able, No. added son or daug desired'; /* VERY IMPORTANT STEP: TO BE RE-VERIFIED: The step below is needed to rule out those who said in Q.32 that they couldn't have kids but now in Q.33 went ahead and answered some numbers. The canvasser should not have even asked them the Q.33 */ if (naddsdes = uaddsdes and naddddes = uaddddes and naddedes = uaddedes) then duplicat = 1; else duplicat = 0; if duplicat = 1 then uaddsdes = naddsdes; if duplicat = 1 then uaddddes = naddddes; if duplicat = 1 then uaddedes = naddedes; if ((naddsdes = . and uaddsdes >= 0) and (naddddes = . and uaddddes >=0) and (naddedes = . and uaddedes >= 0)) then desmiss = 1; else desmiss = 0; if desmiss = 1 then uaddsdes = naddsdes; if desmiss = 1 then uaddddes = naddddes; if desmiss = 1 then uaddedes = naddedes; ablekids = sum (naddsdes, naddddes, naddedes); if wq32 = 2 then ablekids = 0; label ablekids = 'Able: more kids desired'; unabkids = sum (uaddsdes, uaddddes, uaddedes); label unabkids = 'Unable: but more children desired'; if wq34=1 then etalked=1;else etalked=0; label etalked='ever talked # of chld w/ hus.'; if etalked=1 & wq34_1a=1 then talkbm=1;else talkbm=0; label talkbm='etalked before marri.'; if wq34_2a=. then naddshds=0;else naddshds=wq34_2a; label naddshds='No. added sons desired by husb.'; if wq34_2b=. then nadddhds=0;else nadddhds=wq34_2b; label nadddhds='No. added daug desired by husb.'; if wq34_2c=. then naddehds=0;else naddehds=wq34_2c; label naddehds='No. added chld desired by husb.'; /* Questions 35 at p.26 */ if wq35=1 then paradvis=1;else paradvis=0; label paradvis='Par advise no. of chld'; if wq35_1=1 then parwmore=1;else parwmore=0; label parwmore='Par want more'; if wq35_1=2 then parwless=1;else parwless=0; label parwless='Par want less'; if wq35_2=1 & wq35_1=1 then parinfmc=1;else parinfmc=0; label parinfmc='Par influence more chld'; if wq35_2=1 & wq35_1=2 then parinflc=1;else parinflc=0; label parinflc='Par influence less chld'; /* Questions 46, 47 at p. 35 */ if wq46=1 then doassure=1;else doassure=0; label doassure='Anything to assure child support'; if wq46_1a=1 | wq46_1b=1 | wq46_1c=1 then dowhinh=1;else dowhinh=0; label dowhinh='Strategic: withhold inheritance'; if wq46_1a=2 | wq46_1b=2 | wq46_1c=2 then doteach=1;else doteach=0; label doteach= 'Discipline: Teach to be good'; if wq46_1a=3 | wq46_1b=3 | wq46_1c=3 then dontcomp=1;else dontcomp=0; label dontcomp='Less discipline: not strict/complaining'; if wq46_1a=4 | wq46_1b=4 | wq46_1c=4 then dogood=1;else dogood=0; label dogood='Example: good example'; if wq46_1a=5 | wq46_1b=5 | wq46_1c=5 then helpgchi=1;else helpgchi=0; label helpgchi='Bonding: raise chld/care for grchild'; if wq46_1a=6 | wq46_1b=6 | wq46_1c=6 then doeduc=1;else doeduc=0; label doeduc='Human Resource: Give highest education'; if wq46_1a=7 | wq46_1b=7 | wq46_1c=7 then dolove=1;else dolove=0; label dolove='Bonding: give love/warmth'; if wq46_1a=8 | wq46_1b=8 | wq46_1c=8 | wq46_1a=9 | wq46_1b=9 | wq46_1c=9 then doother=1;else doother=0; label doother='Other reasons or DK/NR'; dobond = sum(dolove, helpgchi); label dobond = 'Bonding: DOLOVE + HELPGCHI'; dobehave = sum (dontcomp, dogood); label dobehave = 'Behavior: DONTCOMP + DOGOOD'; dobetech = sum (dobehave, doteach); label dobetech = 'Combined DONTCOMP + DOGOOD + DOTEACH'; if wq46_2=1 then inhelps=1;else inhelps=0; label inhelps='Inheritance help assured'; if wq47=1 then addchbet=1;else addchbet=0; label addchbet='added child better'; if wq47 = 1 then v11 = 2; /* v11 is from pinkw at p. 30 */ if v11=2 then wfinmore=1; else wfinmore=0; label wfinmore='Financ. better if more kids'; if wq47=3 then addchwor=1;else addchwor=0; label addchwor='added child worse'; if wq47 = 3 then v11 = 1; /* v11 is from pinkw at p. 30 */ if v11=1 then wfinless=1; else wfinless=0; label wfinless='Financ. better if less kids'; /* Questions 48 .. at p. 36 */ if wq48=3 then lesscwor=1;else lesscwor=0; label lesscwor='less child worse'; if wq48=1 then lesscbet=1;else lesscbet=0; label lesscbet='less child better'; /* Three kinds of definitions of desired fertility */ /* I: DF11 Combined sample: when DF of sterile women is included: Note: This will also work for the separate sample Case DF21, since when the sample is separated into sterile women, ablekids will simply drop out of the reckoning */ /* if (wq48 = 1 and unabkids = 0 and ablekids = 0) then df11 = sum(lc, unabkids, ablekids, adopt); YOU CAN TRY THIS ONE TOO */ if (wq48 = 1 and unabkids = 0 and ablekids = 0) then df11 = sum(lc, unabkids, ablekids, adopt) -1; /* this statement is designed to exclude cases, if any, where a woman expresses a desire to have more children in one place and a desire to have 1 less child in another place. */ else df11 = sum(lc,unabkids, ablekids, adopt); label df11 = 'DF: both: unable included + adopt'; if df11 = 0 then lower = .; else lower = df11; df_sur = df11-lc; /*Case DF11_ADP When the 'expressed' DF of the sterile women is excluded:*/ if (wq48 = 1 and unabkids = 0 and ablekids = 0) then df11_adp = sum(lc, unabkids, ablekids) -1; else df11_adp = sum(lc,unabkids, ablekids); label df11_adp = 'DF: both: unable incl adp excluded'; /* II: DF12 Combined sample: when DF of sterile women is excluded This will also work as DF22: i.e., for sterile cases, when DF is excluded */ if (wq48 = 1 and unabkids = 0 and ablekids = 0) then df12 = sum(lc, ablekids, adopt) -1; else df12 = sum(lc, ablekids, adopt); label df12 = 'DF: both: unable excluded + adopt'; /*Case DF12_ADP: Combined sample: when DF of sterile women is excluded and adpt. children are excluded. */ if (wq48 = 1 and unabkids = 0 and ablekids = 0) then df12_adp = sum(lc, ablekids) -1; else df12_adp = sum(lc, ablekids); label df12_adp = 'DF: both: unable excl. adpt excl'; /* III: DF21: Separate sample: when only fertile women are included */ if (wq48 = 1 and ablekids = 0) then df23 = sum(lc, ablekids, adopt) -1; else df23 = sum(lc, ablekids, adopt); label df23 = 'Desired Fertility of only fertile women'; if (wq48 = 1 and ablekids = 0) then df23_adp = sum(lc, ablekids) -1; else df23_adp = sum(lc, ablekids); label df23_adp = 'Desired Fertility excluding adopted'; if lesscwor=1 & wq48b=1 then lesshwor=1;else lesshwor=0; label lesshwor='less help work'; if lesscwor=1 & wq48b=2 then lessince=1;lessince=0; label lessince='less incentive hardwork'; if wq49a =1 | wq49b=1 | wq49c=1 then govsmed=1;else govsmed=0; label govsmed='govt help on medical'; if wq49a =2 | wq49b=2 | wq49c=2 then govssen=1;else govssen=0; label govssen='govt help on senior citz home/assoc'; if wq49a =3 | wq49b=3 | wq49c=3 then govsfeed=1;else govsfeed=0; label govsfeed='govt help on food/necessities'; if wq49a =4 | wq49b=4 | wq49c=4 then govsfin=1;else govsfin=0; label govsfin='govt help on finan.support'; if wq49a =5 | wq49b=5 | wq49c=5 then govsjobs=1;else govsjobs=0; label govsjobs='govt help on jobs'; if wq49a =6 | wq49b=6 | wq49c=6 then govspuhe=1;else govspuhe=0; label govspuhe='govt help on pub. health service'; if wq49a =7 | wq49b=7 | wq49c=7 then govsoff=1;else govsoff=0; label govsoff='govt help on offcl take care'; if wq49a =8 | wq49b=8 | wq49c=8 then govsghel=1;else govsghel=0; label govsghel='govt help on general help'; /************************************************ 5. IDEAL REPRODUCTIVITY (OWN) ************************************************/ /************************************************ 6. IDEAL REPRODUCTIVITY (CHILDREN) ************************************************/ /************************************************ 7. FAMILY PLANNING PRACTICES ************************************************/ /* Thai Page 27, Q. 36 */ if wq36=1 then fpmethod=1; else fpmethod=0; label fpmethod='Use Fam. Plan. Method by hhld?'; if wq36_2=. then yrssbfp=0; else if age >= wq36_2 then yrssbfp=age - wq36_2; else yrssbfp=0; label yrssbfp='yrs since began fam. planning'; if wq36a=1 then fptypefs=1;else fptypefs=0; label fptypefs='female sterilization'; if wq36a=2 then fptypems=1;else fptypems=0; label fptypems='male sterilization'; if wq36a=3 then fptypep=1;else fptypep=0; label fptypep='pill'; if wq36a=4 then fptypeiu=1;else fptypeiu=0; label fptypeiu='I.U.D.'; if wq36a=5 then fptypein=1;else fptypein=0; label fptypein='injection'; if wq36a=6 then fptypec=1;else fptypec=0; label fptypec='condom'; if wq36a=7 then fptypen=1;else fptypen=0; label fptypen='norplant'; if wq36a=8 then fptyper=1;else fptyper=0; label fptyper='rhythm'; if wq36a=9 then fptypew=1;else fptypew=0; label fptypew='withdrawal'; /************************************************ 8. OTHER FAMILY MEMBERS ************************************************/ if wq56a=1 then falivewm=1;else falivewm=0; label falivewm='father alive when married'; if wq56b=1 then malivewm=1;else malivewm=0; label malivewm='mother alive when married'; if wq56c=1 then flalivwm=1;else flalivwm=0; label flalivwm='flather alive when married'; if wq56d=1 then mlalivwm=1;else mlalivwm=0; label mlalivwm='mlother alive when married'; /* Page 44 */ if wq57a1=1 then falive=1;else falive=0; label falive='father still alive'; if wq57b1=1 then malive=1;else malive=0; label malive='mother still alive'; if wq57c1=1 then flalive=1;else flalive=0; label flalive='flather still alive'; if wq57d1=1 then mlalive=1;else mlalive=0; label mlalive='mlother still alive'; nparliv=falive+malive; label nparliv='No. of parents alive'; nlparliv=flalive+mlalive; label nlparliv='No. of in_law parents alive'; nparlive=falive+malive+flalive+mlalive; label nparlive='No. of parents alive including in_law'; if wq57a2=1 then fsameh=1;else fsameh=0; label fsameh='father lives the same house'; if wq57a2=2 then fsames=1;else fsames=0; label fsames='father lives the same street'; if wq57a2=3 then fsamev=1;else fsamev=0; label fsamev='father lives the same village'; if wq57a2=4 | wq57a2=5 then foutsidv=1;else foutsidv=0; label foutsidv='father lives outside village'; if (fsameh = 0 and fsames = 0 and fsamev = 0 and foutsidv = 0) then fun_non = 1; else fun_non = 0; label fun_non = 'father residence unknown'; if wq57b2=1 then msameh=1;else msameh=0; label msameh='mother lives in the same house'; if wq57b2=2 then msames=1;else msames=0; label msames='mother lives the same street'; if wq57b2=3 then msamev=1;else msamev=0; label msamev='mother lives in the same village'; if wq57b2=4 | wq57b2=5 then moutsidv=1;else moutsidv=0; label moutsidv='mother lives outside the village'; if (msameh = 0 and msames = 0 and msamev = 0 and moutsidv = 0) then mun_non = 1; else mun_non = 0; label mun_non ='mother residence unknown'; if wq57c2=1 then flsameh=1;else flsameh=0; label flsameh='father-in-law lives in the same house'; if wq57c2=2 then flsames=1;else flsames=0; label flsames='father-in-law lives in the same street'; if wq57c2=3 then flsamev=1;else flsamev=0; label flsamev='father-in-law lives in the same village'; if wq57c2=4 then floutsiv=1;else floutsiv=0; label floutsiv='father-in-law lives outside village'; if (flsameh = 0 and flsames = 0 and flsamev = 0 and floutsiv = 0) then flun_non = 1; else flun_non = 0; label flun_non = 'father-in-law residence unknown'; if wq57d2=1 then mlsameh=1;else mlsameh=0; label mlsameh='mlother lives the same house'; if wq57d2=2 then mlsames=1;else mlsames=0; label mlsames='mlother lives the same street'; if wq57d2=3 then mlsamev=1;else mlsamev=0; label mlsamev='mlother lives the same villege'; if wq57d2=4 then mloutsiv=1;else mloutsiv=0; label mloutsiv='mlother lives outside villege'; if (mlsameh = 0 and mlsames = 0 and mlsamev = 0 and mloutsiv = 0) then mlun_non = 1; else mlun_non = 0; label mlun_non = 'mother-in-law residence unknown'; if fsameh=1 | msameh=1 then anyparh=1; else anyparh=0; label anyparh='At least one parent lives in same house'; if flsameh=1 | mlsameh=1 then aplsameh=1; else aplsameh=0; label aplsameh='>= 1 parent-in-law lives in same house'; if anyparh=1 | aplsameh=1 then anypsamh=1;else anypsamh=0; label anypsamh=' >= 1 parent/parent-in-law lives in same house'; noparh=fsameh+msameh+flsameh+mlsameh; if fsames=1 | msames=1 then anypars=1; else anypars=0; label anypars='At least one parent lives in same street'; if flsames=1 | mlsames=1 then aplsames=1; else aplsames=0; label aplsames='>= 1 parent-in-law lives in same street'; if anypars=1 | aplsames=1 then anypsams=1;else anypsams=0; label anypsams='>= 1 parent/parent-in-law lives in same street'; if fsamev=1 | msamev=1 then anyparv=1; else anyparv=0; label anyparv='At least one parent lives in same village'; if flsamev=1 | mlsamev=1 then aplsamev=1; else aplsamev=0; label aplsamev='>= 1 parent-in-law lives in same village'; if anyparv=1 | aplsamev=1 then anypsamv=1;else anypsamv=0; label anypsamv='>= 1 parent/parent-in-law lives in same village'; if foutsidv=1 | moutsidv=1 then anyparo=1; else anyparo=0; label anyparo='At least one parent lives outside the village'; if floutsiv=1 | mloutsiv=1 then aplout=1; else aplout=0; label aplout='> = 1 parent-in-law lives outside the village'; if anyparo=1 | aplout=1 then anypout=1;else anypout=0; label anypout='> = 1 parent/parent-in-law outside the village'; if msames=1 | msamev=1 then msamesv=1;else msamesv=0; label msamesv = 'Mother lives in same street or village'; if msameh=1 | mlsameh=1 then anymoinh=1;else anymoinh=0; label anymoinh = 'mother or mother-in-law lives in house'; if wq57a3=1 then flivep=1;else flivep=0; label flivep=' father living with spouse'; if wq57a3=2 then fwid=1;else fwid=0; label fwid='father widowed'; if wq57a3=3 then fdiv=1;else fdiv=0; label fdiv = 'father divorced'; if wq57a3=4 then frem=1;else frem=0; label frem='father remarried'; if wq57a3=5 then fother=1;else fother=0; label fother='father other marital status'; /* Questions 58 ... Page 45 (actually a TABLE) */ /* Frequency of visits to parents */ if fsameh=1 then freqvtf=12; if visit1a=1 then freqvtf=10; if visit1a=2 then freqvtf=8; if visit1a=3 then freqvtf=6; if visit1a=4 then freqvtf=4; if visit1a=5 then freqvtf=3; if visit1a=6 then freqvtf=2; if visit1a=7 | visit1a=8 then freqvtf=1; if visit1a=0 & visit1a=. then freqvtf=.; label freqvtf='index for visit freq. to father'; if msameh=1 then freqvtm=12; if visit1b=1 then freqvtm=10; if visit1b=2 then freqvtm=8; if visit1b=3 then freqvtm=6; if visit1b=4 then freqvtm=4; if visit1b=5 then freqvtm=3; if visit1b=6 then freqvtm=2; if visit1b=7 | visit1b=8 then freqvtm=1; if visit1b=0 & visit1b=. then freqvtm=.; label freqvtm='index for visit freq. to mother'; if flsameh=1 then freqvtfl=12; if visit1c=1 then freqvtfl=10; if visit1c=2 then freqvtfl=8; if visit1c=3 then freqvtfl=6; if visit1c=4 then freqvtfl=4; if visit1c=5 then freqvtfl=3; if visit1c=6 then freqvtfl=2; if visit1c=7 | visit1c=8 then freqvtfl=1; if visit1c=0 & visit1c=. then freqvtfl=.; label freqvtfl='index for visit freq. to flather'; if mlsameh=1 then freqvtml=12; if visit1d=1 then freqvtml=10; if visit1d=2 then freqvtml=8; if visit1d=3 then freqvtml=6; if visit1d=4 then freqvtml=4; if visit1d=5 then freqvtml=3; if visit1d=6 then freqvtml=2; if visit1d=7 | visit1d=8 then freqvtml=1; if visit1d=0 & visit1d=. then freqvtml=.; label freqvtml='index for visit freq. to mlother'; /* Frequency of visits FROM parents */ if fsameh=1 then freqvff=12; if visit2a=1 then freqvff=10; if visit2a=2 then freqvff=8; if visit2a=3 then freqvff=6; if visit2a=4 then freqvff=4; if visit2a=5 then freqvff=3; if visit2a=6 then freqvff=2; if visit2a=7 | visit2a=8 then freqvff=1; if visit2a=0 & visit2a=. then freqvff=.; label freqvff='index for visit freq. from father'; if msameh=1 then freqvfm=12; if visit2b=1 then freqvfm=10; if visit2b=2 then freqvfm=8; if visit2b=3 then freqvfm=6; if visit2b=4 then freqvfm=4; if visit2b=5 then freqvfm=3; if visit2b=6 then freqvfm=2; if visit2b=7 | visit2b=8 then freqvfm=1; if visit2b=0 & visit2b=. then freqvfm=.; label freqvfm='index for visit freq. from mother'; if flsameh=1 then freqvffl=12; if visit2c=1 then freqvffl=10; if visit2c=2 then freqvffl=8; if visit2c=3 then freqvffl=6; if visit2c=4 then freqvffl=4; if visit2c=5 then freqvffl=3; if visit2c=6 then freqvffl=2; if visit2c=7 | visit2c=8 then freqvffl=1; if visit2c=0 & visit2c=. then freqvffl=.; label freqvffl='index for visit freq. from flather'; if mlsameh=1 then freqvfml=12; if visit2d=1 then freqvfml=10; if visit2d=2 then freqvfml=8; if visit2d=3 then freqvfml=6; if visit2d=4 then freqvfml=4; if visit2d=5 then freqvfml=3; if visit2d=6 then freqvfml=2; if visit2d=7 | visit2d=8 then freqvfml=1; if visit2d=0 & visit2d=. then freqvfml=.; label freqvfml='index for visit freq. from mlother'; /* Economic transfers in Cash to parents */ if cash1a>0 then cashtof=1;else cashtof=0; label cashtof= 'Cash help to father'; if cash1b>0 then cashtom=1;else cashtom=0; label cashtom='Cash help to mother'; if cash1c>0 then cashtofl=1;else cashtofl=0; label cashtofl='Cash help to father-in-law'; if cash1d>0 then cashtoml=1;else cashtoml=0; label cashtoml='Cash help to mother-in-law'; if (cashtof = 1 | cashtom = 1) then cashpar = 1; else cashpar = 0; label cashpar = 'Cash help to parents'; if (cashtofl = 1 | cashtoml = 1) then cashparl = 1; else cashparl = 0; label cashparl = 'Cash help to parents-in-law'; /* Economic transfers in cash FROM parents */ if cash2a>0 then cashfrf=1;else cashfrf=0; label cashfrf='cash from father'; if cash2b>0 then cashfrm=1;else cashfrm=0; label cashfrm='cash from mother'; if cash2c>0 then cashfrfl=1;else cashfrfl=0; label cashfrfl='cash from flather'; if cash2d>0 then cashfrml=1;else cashfrml=0; label cashfrml='cash from mlother'; /* Economic transfers in kind to parents (kind)*/ if kind1a>0 then kindtof=1;else kindtof=0; label kindtof='Transfers in kind to father'; if kind1b>0 then kindtom=1;else kindtom=0; label kindtom='Transfers in kind to mother'; if kind1c>0 then kindtofl=1;else kindtofl=0; label kindtofl='Transfers in kind to father-in-law'; if kind1d>0 then kindtoml=1;else kindtoml=0; label kindtoml='Transfers in kind to mother-in-law'; if (kindtof = 1 | kindtom = 1 ) then kitopar = 1; else kitopar = 0; label kitopar = 'Transfers in kind to parents'; if (kindtofl = 1 | kindtoml = 1) then kitoparl = 1; else kitoparl = 0; label kitoparl = 'Transfers in kind to parents-in-law'; /* Economic transfers in kind FROM parents (kind)*/ if kind2a>0 then kindfrf=1;else kindfrf=0; label kindfrf='Transfers in kind from father'; if kind2b>0 then kindfrm=1;else kindfrm=0; label kindfrm='Transfers in kind from mother'; if kind2c>0 then kindfrfl=1;else kindfrfl=0; label kindfrfl='Transfers in kind from flather'; if kind2d>0 then kindfrml=1;else kindfrml=0; label kindfrml='Transfers in kind from mlother'; /* Physical care to parents */ if pcare1=1 then caretof=1;else caretof=0; label caretof='Give care to father'; if pcare2=1 then caretom=1;else caretom=0; label caretom='Give care to mother'; if pcare3=1 then caretofl=1;else caretofl=0; label caretofl='Give care to father-in-law'; if pcare4=1 then caretoml=1;else caretoml=0; label caretoml='Give care to mother-in-law'; if (caretof = 1 | caretom = 1 ) then cartopar = 1; else cartopar = 0; label cartopar = 'Physical care of parents'; if (caretofl = 1 | caretoml = 1) then crtoparl = 1; else crtoparl =0; label crtoparl = 'Physical care of parents-in-law'; /* Frequency of Physical care to parents */ if freq1 = 1 then frectof = 12; if freq1 = 2 then frectof = 11; if freq1 = 3 then frectof = 10; if freq1 = 4 then frectof = 9; if freq1 = 5 then frectof = 8; if freq1 = 6 then frectof = 7; if freq1 = 7 then frectof = 6; if freq1 = 8 then frectof = 5; if freq1 = 9 then frectof = 4; if freq1 = 10 then frectof = 3; if freq1 = 11 then frectof = 2; if freq1 = 12 then frectof = 1; label frectof='index for freq. of care to father'; if freq2 = 1 then frectom = 12; if freq2 = 2 then frectom = 11; if freq2 = 3 then frectom = 10; if freq2 = 4 then frectom = 9; if freq2 = 5 then frectom = 8; if freq2 = 6 then frectom = 7; if freq2 = 7 then frectom = 6; if freq2 = 8 then frectom = 5; if freq2 = 9 then frectom = 4; if freq2 = 10 then frectom = 3; if freq2 = 11 then frectom = 2; if freq2 = 12 then frectom = 1; label frectom='index for freq. of care to mother'; if freq3 = 1 then frectofl = 12; if freq3 = 2 then frectofl = 11; if freq3 = 3 then frectofl = 10; if freq3 = 4 then frectofl = 9; if freq3 = 5 then frectofl = 8; if freq3 = 6 then frectofl = 7; if freq3 = 7 then frectofl = 6; if freq3 = 8 then frectofl = 5; if freq3 = 9 then frectofl = 4; if freq3 = 10 then frectofl = 3; if freq3 = 11 then frectofl = 2; if freq3 = 12 then frectofl = 1; label frectofl='index for freq. of care to father-in-law'; if freq4 = 1 then frectoml = 12; if freq4 = 2 then frectoml = 11; if freq4 = 3 then frectoml = 10; if freq4 = 4 then frectoml = 9; if freq4 = 5 then frectoml = 8; if freq4 = 6 then frectoml = 7; if freq4 = 7 then frectoml = 6; if freq4 = 8 then frectoml = 5; if freq4 = 9 then frectoml = 4; if freq4 = 10 then frectoml = 3; if freq4 = 11 then frectoml = 2; if freq4 = 12 then frectoml = 1; label frectoml='index for freq. of care to mother-in-law'; /* Household help (Care?) FROM parents */ hwrkfrf1=0; if hwork1a=1 then hwrkfrf1=2; if hwork1a=2 then hwrkfrf1=1; if hwork1a=3 then hwrkfrf1=0; label hwrkfrf1 = 'Help by wifes father in child care'; hwrkfrf2=0; if hwork2a=1 then hwrkfrf2=2; if hwork2a=2 then hwrkfrf2=1; if hwork2a=3 then hwrkfrf2=0; label hwrkfrf2 = 'Help by wifes father in cooking'; hwrkfrf3=0; if hwork3a=1 then hwrkfrf3=2; if hwork3a=2 then hwrkfrf3=1; if hwork3a=3 then hwrkfrf3=0; label hwrkfrf3= 'Help by wifes father in cleaning'; hwrkfrf4=0; if hwork4a=1 then hwrkfrf4=2; if hwork4a=2 then hwrkfrf4=1; if hwork4a=3 then hwrkfrf4=0; label hwrkfrf4= 'Help by wifes father in washing clothes'; hwrkfrf5=0; if hwork5a=1 then hwrkfrf5=2; if hwork5a=2 then hwrkfrf5=1; if hwork5a=3 then hwrkfrf5=0; label hwrkfrf5= 'Help by wifes father in fetching water/fuel'; hwrkfrm1=0; if hwork1b=1 then hwrkfrm1=2; if hwork1b=2 then hwrkfrm1=1; if hwork1b=3 then hwrkfrm1=0; label hwrkfrm1= 'Help by wifes mother in child care'; hwrkfrm2=0; if hwork2b=1 then hwrkfrm2=2; if hwork2b=2 then hwrkfrm2=1; if hwork2b=3 then hwrkfrm2=0; label hwrkfrm2= 'Help by wifes mother in cooking'; hwrkfrm3=0; if hwork3b=1 then hwrkfrm3=2; if hwork3b=2 then hwrkfrm3=1; if hwork3b=3 then hwrkfrm3=0; label hwrkfrm3 = 'Help by wifes mother in cleaing'; hwrkfrm4=0; if hwork4b=1 then hwrkfrm4=2; if hwork4b=2 then hwrkfrm4=1; if hwork4b=3 then hwrkfrm4=0; label hwrkfrm4 = 'Help by wifes mother in washing clothes'; hwrkfrm5=0; if hwork5b=1 then hwrkfrm5=2; if hwork5b=2 then hwrkfrm5=1; if hwork5b=3 then hwrkfrm5=0; label hwrkfrm5= 'Help by wifes mother in fetching water/fuel'; hwkfrfl1=0; if hwork1c=1 then hwkfrfl1=2; if hwork1c=2 then hwkfrfl1=1; if hwork1c=3 then hwkfrfl1=0; label hwkfrfl1 = 'Help by father-in-law in child care'; hwkfrfl2=0; if hwork2c=1 then hwkfrfl2=2; if hwork2c=2 then hwkfrfl2=1; if hwork2c=3 then hwkfrfl2=0; label hwkfrfl2 = 'Help by father-in-law in cooking'; hwkfrfl3=0; if hwork3c=1 then hwkfrfl3=2; if hwork3c=2 then hwkfrfl3=1; if hwork3c=3 then hwkfrfl3=0; label hwkfrfl3 = 'Help by father-in-law in cleaning'; hwkfrfl4=0; if hwork4c=1 then hwkfrfl4=2; if hwork4c=2 then hwkfrfl4=1; if hwork4c=3 then hwkfrfl4=0; label hwkfrfl4 = 'Help by father-in-law in washing clothes'; hwkfrfl5=0; if hwork5c=1 then hwkfrfl5=2; if hwork5c=2 then hwkfrfl5=1; if hwork5c=3 then hwkfrfl5=0; label hwkfrfl5 = 'Help by father-in-law in fetching water/fuel'; hwkfrml1=0; if hwork1d=1 then hwkfrml1=2; if hwork1d=2 then hwkfrml1=1; if hwork1d=3 then hwkfrml1=0; label hwkfrml1 = 'Help by mother-in-law in child care'; hwkfrml2=0; if hwork2d=1 then hwkfrml2=2; if hwork2d=2 then hwkfrml2=1; if hwork2d=3 then hwkfrml2=0; label hwkfrml2 = 'Help by mother-in-law in cooking'; hwkfrml3=0; if hwork3d=1 then hwkfrml3=2; if hwork3d=2 then hwkfrml3=1; if hwork3d=3 then hwkfrml3=0; label hwkfrml3 = 'Help by mother-in-law in cleaning'; hwkfrml4=0; if hwork4d=1 then hwkfrml4=2; if hwork4d=2 then hwkfrml4=1; label hwkfrml4 = 'Help by mother-in-law in washing clothes'; hwkfrml5=0; if hwork5d=1 then hwkfrml5=2; if hwork5d=2 then hwkfrml5=1; if hwork5d=3 then hwkfrml5=0; label hwkfrml5 = 'Help by mother-in-law in fetching water/fuel'; helpff= hwrkfrf1 + hwrkfrf2 + hwrkfrf3 + hwrkfrf4 + hwrkfrf5; helpfm= hwrkfrm1 + hwrkfrm2 + hwrkfrm3 + hwrkfrm4 + hwrkfrm5; helpffl= hwkfrfl1 + hwkfrfl2 + hwkfrfl3 + hwkfrfl4 + hwkfrfl5; /* helpfml= hwkfrfm1 + hwkfrfm2 + hwkfrfm3 + hwkfrfm4 + hwkfrfm5; */ if (helpff > 0 | helpfm > 0 | helpffl > 0 | helpfml > 0) then helpfrom = 1; else helpfrom = 0; label helpfrom = 'Help from parents/ in-law'; /* Health status of parents */ if 00 then aoldbrsv=1; else if wq62a2 ne 1 & noldbros>0 then aoldbrsv=0; else aoldbrsv=.; label aoldbrsv='all old bro.s in same village'; if wq62a2=2 & noldbros>0 then soldbrsv=1; else if wq62a2 ne 2 & noldbros>0 then soldbrsv=0; else soldbrsv=.; label soldbrsv='some old bro.s in same village'; if wq62b2=1 & nyonbros>0 then ayonbrsv=1; else if wq62b2 ne 1 & nyonbros>0 then ayonbrsv=0; else ayonbrsv=.; label ayonbrsv='all young bro.s in same village'; if wq62b2=2 & nyonbros>0 then syonbrsv=1; else if wq62b2 ne 2 & nyonbros>0 then syonbrsv=0; else syonbrsv=.; label syonbrsv='some young bro.s in same village'; if wq62c2=1 & noldsis>0 then aoldsisv=1; else if wq62c2 ne 1 & noldsis>0 then aoldsisv=0; else aoldsisv=.; label aoldsisv='all old sis.s in same village'; if wq62c2=2 & noldsis>0 then syonsisv=1; else if wq62c2 ne 2 & noldsis>0 then soldsisv=0; else soldsisv=.; label soldsisv='some old sis.s in same village'; if wq62d2=1 & nyonsis>0 then ayonsisv=1; else if wq62d2 ne 1 & nyonsis>0 then ayonsisv=0; else ayonsisv=.; label ayonsisv='all young sis.s in same village'; if wq62d2=2 & nyonsis>0 then syonsisv=1; else if wq62d2 ne 2 & nyonsis>0 then syonsisv=0; else syonsisv=.; label syonsisv='some young sis.s in same village'; noldbrl=wq63a1; label noldbrl='No of old bro.s in law'; nyonbrl=wq63b1; label nyonbrl='No of yon bro.s in law'; noldsisl=wq63c1; label noldsisl='No of old sis.s in law'; nyonsisl=wq63d1; label nyonsisl='No of yon sis.s in law'; nsibll=wq63e1; label nsibll=' no of broders and sis.s in law'; if wq63a2=1 & noldbros>0 then aoldbrls=1; else if wq63a2 ne 1 & noldbros>0 then aoldbrls=0; else aoldbrls=.; label aoldbrls='all old bro.sl at same street'; if wq63a2=2 & noldbros>0 then soldbrls=1; else if wq63a2 ne 2 & noldbros>0 then soldbrls=0; else soldbrls=.; label soldbrls='some old bro.sl at same street'; if wq63b2=1 & nyonbros>0 then ayonbrls=1; else if wq63b2 ne 1 & nyonbros>0 then ayonbrls=0; else ayonbrls=.; label ayonbrls='all young bro.sl at same street'; if wq63b2=2 & nyonbros>0 then syonbrls=1; else if wq63b2 ne 2 & nyonbros>0 then syonbrls=0; else syonbrls=.; label syonbrls='some young bro.sl at same street'; if wq63c2=1 & noldsis>0 then aoldsils=1; else if wq63c2 ne 1 & noldsis>0 then aoldsils=0; else aoldsils=.; label aoldsils='all old sis.sl at same street'; if wq63c2=2 & noldsis>0 then syonsils=1; else if wq63c2 ne 2 & noldsis>0 then soldsils=0; else soldsils=.; label soldsils='some old sis.sl at same street'; if wq63d2=1 & nyonsis>0 then ayonsils=1; else if wq63d2 ne 1 & nyonsis>0 then ayonsils=0; else ayonsils=.; label ayonsils='all young sis.sl at same street'; if wq63d2=2 & nyonsis>0 then syonsils=1; else if wq63d2 ne 2 & nyonsis>0 then syonsils=0; else syonsils=.; label syonsils='some young sis.sl at same street'; if wq64=1 then otrelinv=1;else otrelinv=0; label otrelinv=' Others rel. in villege'; if wq64=1 & wq64_1=1 then otrelchp=1;else otrelchp=0; label otrelchp='Oth rel. in vill. who could help'; if wq65=1 | wq65=3 then relhpfor=1;else relhpfor=0; if wq65=2 | wq65=3 then ghptor=1;else ghptor=0; label relhpfor='help together with rel.'; /************************************************ 9. EMPLOYMENT ************************************************/ /* Question 1,2,3,4,5 at page 13 */ if occu=1 then farmer=1;else farmer=0; label farmer='Farm.own land'; if occu=2 then farmlab=1;else farmlab=0; label farmlab='farm labor'; if occu=3 | occu=5 | occu=7 | occu=9 | occu=11 then fambus=1;else fambus=0; label fambus='family business'; if occu=4 then empfambu=1;else empfambu=0; label empfambu='employee-fam bus'; if occu=6 | occu=8 | occu=10 | occu=12 | occu=13 then employee=1; else employee=0; if occu=14 then craft=1;else craft=0; label craft='skilled crafts'; if occu=96 then houswife=1;else houswife=0; if occu=97 then student=1;else student=0; if mage < 90 then hage=mage;else hage=.; label hage='age of husband'; if moccu=1 then hfarmer=1;else hfarmer=0; if moccu=2 then hfarmlab=1;else hfarmlab=0; if moccu=3 | moccu=5 | moccu=7 | moccu=9 | moccu=11 then hfambus=1; else hfambus=0; if moccu=4 then hempfamb=1;else hempfamb=0; if moccu=6 | moccu=8 | moccu=10 | moccu=12 | moccu=13 then hemploye=1; else hemploye=0; if moccu=14 then hcraft=1;else hcraft=0; if moccu=9 | moccu=96 then houshus=1;else houshus=0; /* Classification of 'wealth' effect of husb's occ */ if (houshus = 1) then hearn = 0; if (hfarmer = 1 | hfarmlab = 1 | hcraft = 1 ) then hearn = 1; if (hfambus = 1 | hempfamb = 1 | hemloyee = 1) then hearn = 2; /* Questions 7, 8, 9 at page 14 */ if wq7=1 then marcpar=1;else marcpar=0; label marcpar='par choice hus.'; if wq7=2 then marcparw=1;else marcparw=0; label marcparw='par choice hus. with R s o.k.'; if wq7=3 then marcboth=1;else marcboth=0; label marcboth='both par and R decieded'; if wq7=4 then marcownw=1;else marcownw=0; label marcownw='R s choice with par approval'; if wq7=5 then marcown=1;else marcown=0; label marcown='Toally R s decision'; if wq7=1 then marcpari=4; if wq7=2 then marcpari=3; if wq7=3 then marcpari=2; if wq7=4 then marcpari=1; if wq7=5 then marcpari=0; if wq7=6 | wq7=7 | wq7=8 | wq7=9 then marcpari=.; /* Question 15 at p.18 */ if work1=1 then wwfarm=1;else wwfarm=0; label wwfarm='farming for family'; if work2=1 then wwfemp=1;else wwfemp=0; label wwfemp='farming for others'; if work3=1 | work4=1 then wwanimh=1;else wwanimh=0; label wwanimh='animal hus.ary and raising'; if work5=1 then wwcloth=1;else wwcloth=0; label wwcloth='sewing clothes,kitting'; if work6=1 | work7=1 then wwbus=1;else wwbus=0; label wwbus='own business'; if work8=1 then wwemp=1;else wwemp=0; label wwemp='non-agriculture or salary emp.'; if work9=1 then wwprof=1;else wwprof=0; label wwprof='prof like doctor and lawyer etc.'; if work10=1 then wwother=1;else wwother=0; label wwother='any other earning activities'; /* Measure of work in last 12 mths */ if (wwfarm = 1 | wwfemp = 1 | wwanimh = 1 | wwcloth = 1) then ww1 = 1; else ww1 = 0; if (wwbus = 1 | wwemp = 1 | wwprof = 1 | wwother = 1) then ww2 = 1; else ww2 = 0; if (ww1 ne 1 and ww2 ne 1) then wnowork = 1; else wnowork = 0; if ww1 = 1 and ww2 = 0 then wwfarm = 1; else wwfarm = 0; label wwfarm = 'Wife worked in last 12 mths: farm'; if ww1 = 0 and ww2 = 1 then wwrksec = 1; else wwrksec = 0; label wwrksec = 'Wife worked in last 12 mths:secondary'; if ww1 = 1 and ww2 = 1 then wwrkboth = 1; else wwrkboth = 0; label wwrkboth= 'Wife worked in more than 1 group'; if (wwfemp = 1 | wwemp = 1 | wwprof = 1) then salwork = 1; else salwork =0; label salwork = 'Wife: salaried work'; /* Index of work level */ if (wwfarm = 1 | wwfemp = 1 | wwanimh = 1 | wwother=1 ) then wlevel = 1; else wlevel = 0; if (wwcloth = 1 | wwbus = 1) then wlevel = 2; if (wwemp = 1 | wwprof = 1) then wlevel = 3; /* Index of regularity of work*/ wnjobs=wwfarm+wwfemp+wwanimh+wwcloth+wwbus+wwemp+wwprof+wwother; label wnjobs='# of jobs taken in past 12 mon.'; if nature1=1 then regww1=3; else if nature1=2 then regww1=2; else if nature1=3 then regww1=1; label regww1='work regularity index for work1'; if nature2=1 then regww2=3; else if nature2=2 then regww2=2; else if nature2=3 then regww2=1; label regww2='work regularity index for work2'; if nature3=1 then regww3=3; else if nature3=2 then regww3=2; else if nature3=3 then regww3=1; label regww3='work regularity index for work3'; if nature4=1 then regww4=3; else if nature4=2 then regww4=2; else if nature4=3 then regww4=1; label regww4='work regularity index for work4'; if nature5=1 then regww5=3; else if nature5=2 then regww5=2; else if nature5=3 then regww5=1; label regww5='work regularity index for work5'; if nature6=1 then regww6=3; else if nature6=2 then regww6=2; else if nature6=3 then regww6=1; label regww6='work regularity index for work6'; if nature7=1 then regww7=3; else if nature7=2 then regww7=2; else if nature7=3 then regww7=1; label regww7='work regularity index for work7'; if nature8=1 then regww8=3; else if nature8=2 then regww8=2; else if nature8=3 then regww8=1; label regww8='work regularity index for work8'; if nature9=1 then regww9=3; else if nature9=2 then regww9=2; else if nature9=3 then regww9=1; label regww9='work regularity index for work9'; if nature10=1 then regww10=3; else if nature10=2 then regww10=2; else if nature10=3 then regww10=1; label regww10='work regularity index for work10'; treginww=sum(regww1,regww2,regww3,regww4,regww5,regww6,regww7,regww8, regww9,regww10); label treginww='total regularity of wife work'; /* Index of regularity of work (2nd index) */ if nature1=1 then regw2w1=3; else if nature1=3 then regw2w1=2; else if nature1=2 then regw2w1=1; label regw2w1='work regularity index(2) for work1'; if nature2=1 then regw2w2=3; else if nature2=3 then regw2w2=2; else if nature2=2 then regw2w2=1; label regw2w2='work regularity index(2) for work2'; if nature3=1 then regw2w3=3; else if nature3=3 then regw2w3=2; else if nature3=2 then regw2w3=1; label regw2w3='work regularity index(2) for work3'; if nature4=1 then regw2w4=3; else if nature4=3 then regw2w4=2; else if nature4=2 then regw2w4=1; label regw2w4='work regularity index(2) for work4'; if nature5=1 then regw2w5=3; else if nature5=3 then regw2w5=2; else if nature5=2 then regw2w5=1; label regw2w5='work regularity index(2) for work5'; if nature6=1 then regw2w6=3; else if nature6=3 then regw2w6=2; else if nature6=2 then regw2w6=1; label regw2w6='work regularity index(2) for work6'; if nature7=1 then regw2w7=3; else if nature7=3 then regw2w7=2; else if nature7=2 then regw2w7=1; label regw2w7='work regularity index(2) for work7'; if nature8=1 then regw2w8=3; else if nature8=3 then regw2w8=2; else if nature8=2 then regw2w8=1; label regw2w8='work regularity index(2) for work8'; if nature9=1 then regw2w9=3; else if nature9=3 then regw2w9=2; else if nature9=2 then regw2w9=1; label regw2w9='work regularity index(2) for work9'; if nature10=1 then regw2w10=3; else if nature10=3 then regw2w10=2; else if nature10=2 then regw2w10=1; label regw2w10='work regularity index(2) for work10'; /* Index 1 of opp cost of wife */ if (wwfemp = 1 | wwother=1 ) then oppcostw = 1; else oppcostw = 0; if (wwemp = 1 ) then oppcostw = 2; if (wwprof = 1) then oppcostw = 3; label oppcostw = 'Measure 1 of opp. cost of wife_s time'; /* Index 2 of opp cost of wife (not used) */ if (regw2w2 = 2 | regw2w10 = 2) and (wwfemp = 1 | wwother = 1) then oppcost2 = 1; else oppcost2 = 0; if (regw2w2 = 3 | regw2w10 = 3) and (wwfemp = 1 | wwother = 1) then oppcost2 = 2; if (regw2w8 = 2) and (wwemp = 1 ) then oppcost2 = 3; if (regw2w8 = 3) and (wwemp = 1 ) then oppcost2 = 4; if (regw2w9 =2) and (wwprof = 1) then oppcost2 = 5; if (regw2w9 =3) and (wwprof = 1) then oppcost2 = 6; label oppcost2 = 'Measure 2 of opp. cost of wife_s time'; /* Index of work status (whether paid or not) */ if workst1=1 then empstw1=3; else if workst1=2 then empstw1=2; else if workst1=3 then empstw1=1; label empstw1='work regularity index for work1'; if workst2=1 then empstw2=3; else if workst2=2 then empstw2=2; if workst1=1 then empstw1=3; else if workst1=2 then empstw1=2; else if workst1=3 then empstw1=1; label empstw1='work regularity index for work1'; if workst2=1 then empstw2=3; else if workst2=2 then empstw2=2; else if workst2=3 then empstw2=1; label empstw2='work regularity index for work2'; if workst3=1 then empstw3=3; else if workst3=2 then empstw3=2; else if workst3=3 then empstw3=1; label empstw3='work regularity index for work3'; if workst4=1 then empstw4=3; else if workst4=2 then empstw4=2; else if workst4=3 then empstw4=1; label empstw4='work regularity index for work4'; if workst5=1 then empstw5=3; else if workst5=2 then empstw5=2; else if workst5=3 then empstw5=1; label empstw5='work regularity index for work5'; if workst6=1 then empstw6=3; else if workst6=2 then empstw6=2; else if workst6=3 then empstw6=1; label empstw6='work regularity index for work6'; if workst7=1 then empstw7=3; else if workst7=2 then empstw7=2; else if workst7=3 then empstw7=1; label empstw7='work regularity index for work7'; if workst8=1 then empstw8=3; else if workst8=2 then empstw8=2; else if workst8=3 then empstw8=1; label empstw8='work regularity index for work8'; if workst9=1 then empstw9=3; else if workst9=2 then empstw9=2; else if workst9=3 then empstw9=1; label empstw9='work regularity index for work9'; if workst10=1 then empstw10=3; else if workst10=2 then empstw10=2; else if workst10=3 then empstw10=1; label empstw10='work regularity index for work10'; twstatw=sum(empstw1,empstw2,empstw3,empstw4,empstw5,empstw6,empstw7,empstw8, empstw9,empstw10); label twstatw='total regularity of wife work'; /* labor force participation */ if (workst3 = 1 | workst4 = 1 | workst5 = 1 | workst8 = 1 | workst9 = 1 | workst10 = 1) then wforce = 1; else wforce =0; if (workst1 = 1 | workst2 = 1) then wagril = 1; else wagril =0; if (workst3 = 1 | workst4 = 1) then wsecond = 1; else wsecond =0; if (workst5 = 1 | workst6 = 1 | workst7 = 1) then wtert= 1; else wtert=0; if (workst8 = 1 | workst9 = 1 | workst10 = 1) then wprof= 1; else wprof=0; /* Questions 16 at p.19 */ if wq16=1 then wuntilca=1;else wuntilca=0; label wuntilca='Until wife can t do'; if wq16=2 then wuntilcw=1;else wuntilcw=0; label wuntilcw='Until child works'; if wq16=3 then wuntilss=1;else wuntilss=0; label wuntilss='Unitil someone support/depends'; if wq16=99 then wuntildk=1;else wuntildk=0; label wuntildk='can t specipy'; /************************************************ 10. SAVINGS ************************************************/ /* Thai Page 50 */ if wq66=1 then savimp = 2; if wq66=2 then savimp = 1; if wq66=3 then savimp = 0; if wq66=4 then savimp = 1; if wq66=5 then savimp = .; label savimp='savings are important'; if savimp=1 & wq66_1=. then savfch=1; else if savimp=1 & wq66_1 ne . then savfch=0; else savfch=0; label savfch='savings for chld'; if savimp=1 & wq66_1=1 then savfses=1; else if savimp=1 & wq66_1 ne 1 then savfses=0; else savfses=0; label savfses='savings for ses.'; if savimp=1 & (wq66_1=2 | wq66_1=3) then savfsib=1; else if savimp=1 & wq66_1 ne 2 & wq66_1 ne 3 then savfsib=0; else savfsib=0; label savfsib='savings for sis.and bros.'; if savimp=1 & wq66_2=1 then savfeduc=1; else if savimp=1 & wq66_2 ne 1 then savfeduc=0; else savfeduc=0; label savfeduc='savings for educ'; if savimp=1 & wq66_3=1 then savfolda=1; else if savimp=1 & wq66_3 ne 1 then savfolda=0; else savfolda=0; label savfolda='savings for old age'; /* Page 51 */ if wq67a = 1 or wq67b = 1 or wq67c = 1 or wq67d = 1 or wq67e = 1 or wq67f = 1 then savany = 1; else savany = 0; label savany = 'Have any savings?'; if wq67a = 1 or wq67d = 1 then savmkt = 1; else savmkt = 0; label savmkt = 'Have any savings?'; n_savg = sum(wq67a, wq67b, wq67c, wq67d, wq67e, wq67f); label n_savg = 'Number of savings instruments'; if wq67a=1 then bankdep=1;else bankdep=0; label bankdep='bank deposits savings'; if wq67b=1 then lifeins=1;else lifeins=0; label lifeins='life insurance savings'; if wq67c=1 then funfund=1;else funfund=0; label funfund='funaeral fund savings'; if wq67d=1 then coopsh=1;else coopsh=0; label coopsh='cooperatives or shares'; if wq67e=1 then landinv=1;else landinv=0; if wq67f=1 then provfund=1;else provfund=0; label provfund='provident fund'; wrpens = provfund; label wrpens='right to receive pension?'; if wq67_1a >0 then rpension = 1; else rpension = 0; label rpension = 'Respondent gets pension'; if wq67_1b >0 then spension = 1; else spension = 0; label spension = 'Husband gets pension'; /* Page 52 */ if wq69=2 | wq69=3 then boutland=1;else boutland=0; label boutland='bought land in last 10 yrs'; if wq69=1 | wq69=3 then soldland=1;else soldland=0; label soldland='sold land in last 10 yrs'; if wq69_1a=1 then solddebt=1;else solddebt=0; label solddebt='sold for debt'; if wq69_1a=2 then solddist=1;else solddist=0; label solddist='sold for land far'; if wq69_1a=3 then soldbuym=1;else soldbuym=0; label soldbuym='sold for buy more land'; if wq69_1a=4 then soldmigr=1;else soldmigr=0; label soldmigr='sold for migrate'; if wq69_1a=5 then soldmfam=1;else soldmfam=0; label soldmfam='sold for money for fam.'; if wq69_1a=6 then soldprof=1;else soldprof=0; label soldprof='sold for profit'; if wq69_1a=7 | wq69_1a=8 | wq69_1a=9 then soldothr=1; else soldothr=0; label soldothr='sold for neighbor'; if wq69_1b=1 then boutneed=1;else boutneed=0; label boutneed='bought for more land'; if wq69_1b=2 then boutchil=1;else boutchil=0; label boutchil='bought for giving to chld'; if wq69_1b=3 then bouthous=1;else bouthous=0; label bouthous='bought for building house'; if wq69_1b=5 then boutnear=1;else boutnear=0; label boutnear='bought for near own'; if wq69_1b=4 | wq69_1b=6 | wq69_1b=7 | wq69_1b=8 | wq69_1b=9 then boutothr=1; else boutothr=0; label boutothr='bought for others'; /************************************************ 11. DEBTS ************************************************/ if wq68=1 then wdebts=1;else wdebts=0; label wdebts=' have debts'; /************************************************ 12. LAND ************************************************/ /************************************************ 13. INHERITANCE ************************************************/ /* Thai Page 38, Q. 52 */ if wq52=1 then inherit=1;else inherit=0; label inherit='received inheritance'; if inherit=1 & wq52_1a=1 then inhfromf=1;/* ??? */ else if inherit=1 & wq52_1a ne 1 then inhfromf=0; else inhfromf=.; label inhfromf='inherited from father'; if inherit=1 & wq52_1b=1 then inhfromm=1; else if inherit=1 & wq52_1b ne 1 then inhfromm=0; else inhfromm=.; label inhfromm='inherited from mother'; if inherit=1 & wq52_1c=1 then inhfromp=1; else if inherit=1 & wq52_1c ne 1 then inhfromp=0; else inhfromp=.; label inhfromp='inherited from parent'; if inherit=1 & wq52_1d=1 then inhfromo=1; else if inherit=1 & wq52_1d ne 1 then inhfromo=0; else inhfromo=.; label inhfromo='inherited from other'; if inherit=1 & wq52_2a>0 then linher=1; else if inherit=1 & wq52_2a=0 then linher=0; else linher=.; label linher='land inherited'; if linher=1 then linhered=1;else linhered=0; label linhered='dummy for linher=1 or not'; if inherit=1 & wq52_2b>0 then pinher=1; else if inherit=1 & wq52_2b=0 then pinher=0; else pinher=.; label pinher='other properties inherited'; if pinher=1 then pinhered=1;else pinhered=0; label pinhered='dummy for pinher=1 or not'; if inherit=1 & wq52_2c>0 then minher=1; else if inherit=1 & wq52_2c=0 then minher=0; else minher=.; label minher='money inherited'; if inherit=1 & wq52_2d>0 then oinher=1; else if inherit=1 & wq52_2d=0 then oinher=0; else oinher=.; label oinher='other inherited'; if inherit=1 & wq52_3a>0 then inherbd=1; else if inherit=1 & wq52_3a=0 then inherbd=0; else inherbd=.; label inherbd='passed before dead'; if inherit=1 & wq52_3b>0 then inherad=1; else if inherit=1 & wq52_3b=0 then inherad=0; else inherad=.; label inherad='passed after dead'; if wq54 = 1 then inherexp = 1; else inherexp= 0; label inherexp = 'Expectation of receipt of inheritance in future'; if inherit=1 & wq54_4=1 then inmdive=1; else if inherit=1 & wq54_4 ne 1 then inmdive=0; else inmdive=.; label inmdive='equally divided'; if inherit=1 & wq54_4=2 then inmrecm=1; else if inherit=1 & wq54_4 ne 2 then inmrecm=0; else inmrecm=.; label inmrecm='received larger share'; if inherit=1 & wq54_4=3 then inmrecl=1; else if inherit=1 & wq54_4 ne 3 then inmrecl=0; else inmrecl=.; label inmrecl='received smaller share'; if inherit=1 & wq54_4a=1 then inmobhel=1; else if inherit=1 & wq54_4a ne 1 then inmobhel=0; else inmobhel=.; label inmobhel = 'inherit more because help'; if inherit=1 & wq54_4a=2 then inmobold=1; else if inherit=1 & wq54_4a ne 2 then inmobold=0; else inmobold=.; label inmobold = 'inherit more because older'; if inherit=1 & wq54_4a=3 then inmobyon=1; else if inherit=1 & wq54_4a ne 3 then inmobyon=0; else inmobyon=.; label inmobyon = 'inherit more because younger'; if inherit=1 & wq54_4a=4 then inmobos=1; else if inherit=1 & wq54_4a ne 4 then inmobos=0; else inmobos=.; label inmobos = 'NEEDS LABEL'; if inherit=1 & wq54_4a=5 then inmoboc=1; else if inherit=1 & wq54_4a ne 5 then inmoboc=0; else inmoboc=.; label inmoboc = 'NEEDS LABEL'; if inherit=1 & wq54_4a=6 then inmobled=1; else if inherit=1 & wq54_4a ne 6 then inmobled=0; else inmobled=.; label inmobled = 'NEEDS LABEL'; if inherit=1 & wq54_4a=7 then inmoblef=1; else if inherit=1 & wq54_4a ne 7 then inmoblef=0; else inmoblef=.; label inmoblef = 'NEEDS LABEL'; if inherit=1 & wq54_4a=8 then inmobswo=1; else if inherit=1 & wq54_4a ne 8 then inmobswo=0; else inmobswo=.; label inmobswo = 'NEEDS LABEL'; /* Page 39 */ if wq53=1 then hinherit=1;else hinherit=0; if hinherit=1 & wq53_1a=1 then hinfromf=1; else if hinherit=1 & wq53_1a ne 1 then hinfromf=0; else hinfromf=.; label hinfromf='hus. inherited from flather'; if hinherit=1 & wq53_1b=1 then hinfromm=1; else if hinherit=1 & wq53_1b ne 1 then hinfromm=0; else hinfromm=.; label hinfromm='hus. inherited from mlother'; if hinherit=1 & wq53_1c=1 then hinfromp=1; else if hinherit=1 & wq53_1c ne 1 then hinfromp=0; else hinfromp=.; label hinfromp='hus. inherited from parl'; if hinherit=1 & wq53_1d=1 then hinfromo=1; else if hinherit=1 & wq53_1d ne 1 then hinfromo=0; else hinfromo=.; label hinfromo='hus. inherited from other'; if hinherit=1 & wq53_2a>0 then hinhelan=1; else if hinherit=1 & wq53_2a=0 then hinhelan=0; else hinhelan=.; label hinhelan='land inherited to hus.'; if hinherit=1 & wq53_2b>0 then hinheop=1; else if hinherit=1 & wq53_2b=0 then hinheop=0; else hinheop=.; label hinheop='other propties inhted to hus.'; if hinherit=1 & wq53_2c>0 then hinhemon=1; else if hinherit=1 & wq53_2c=0 then hinhemon=0; else hinhemon=.; label hinhemon='money inherited to hus.'; if hinherit=1 & wq53_2d>0 then hinheoth=1; else if hinherit=1 & wq53_2d=0 then hinheoth=0; else hinheoth=.; label hinheoth='other inherited to hus.'; if inherit = 1 | hinherit = 1 then inheritd = 1; else inheritd = 0; label inheritd = 'inheritance received by either spouse'; /* Page 40 */ if wq54=1 then exinher=1;else exinher=0; if wq54_2a=1 then exinhlan=1;else exinhlan=0; if wq54_2b=1 then exinhop=1;else exinhop=0; if wq54_2c=1 then exinhmon=1;else exinhmon=0; if wq54_2d=1 then exinhoth=1;else exinhoth=0; /** questionaire missing and so label ??? **/ if exinher=1 & wq54_3a=1 then exinhbd=1; else if exinher=1 & wq54_3a ne 1 then exinhbd=0; else exinhbd=.; label exinhbd='expect to receive before death'; if exinher=1 & wq54_3b=1 then exinhad=1; else if exinher=1 & wq54_3b ne 1 then exinhad=0; else exinhad=.; label exinhbd='expect to receive after death'; if exinher=1 & wq54_4=1 then exindive=1; else if exinher=1 & wq54_4 ne 1 then exindive=0; else exindive=.; label exindive='equally devided'; if exinher=1 & wq54_4=2 then exinrmor=1; else if exinher=1 & wq54_4 ne 2 then exinrmor=0; else exinrmor=.; label exinrmor='expect to receive more share'; if exinher=1 & wq54_4a=1 then erecmbhe=1; else if exinher=1 & wq54_4a ne 1 then erecmbhe=0; else erecmbhe=.; label erecmbhe='expect more because help more'; if exinher=1 & wq54_4a=2 then erecmbol=1; else if exinher=1 & wq54_4a ne 2 then erecmbol=0; else erecmbol=.; if exinher=1 & wq54_4a=3 then erecmyo=1; else if exinher=1 & wq54_4a ne 3 then erecmyo=0; else erecmyo=.; if exinher=1 & wq54_4a=4 then erecmos=1; else if exinher=1 & wq54_4a ne 4 then erecmos=0; else erecmos=.; if exinher=1 & wq54_4a=5 then erecmoc=1; else if exinher=1 & wq54_4a ne 5 then erecmoc=0; else erecmoc=.; if exinher=1 & wq54_4a=6 then erecmle=1; else if exinher=1 & wq54_4a ne 6 then erecmle=0; else erecmle=.; if exinher=1 & wq54_4a=7 then erecmlf=1; else if exinher=1 & wq54_4a ne 7 then erecmlf=0; else erecmlf=.; if exinher=1 & wq54_4a=8 then erecmwo=1; else if exinher=1 & wq54_4a ne 8 then erecmwo=0; else erecmwo=.; /* Page 42 */ if wq55=1 then giveinh=1;else giveinh=0; label giveinh='expect to give inheritace'; if giveinh=1 & wq55_1=1 then giveinbd=1; else if giveinh=1 & wq55_1 ne 1 then giveinbd=0; else giveinbd=.; label giveinbd='expect to give before death'; if giveinh=1 & wq55_1=2 then giveinad=1; else if giveinh=1 & wq55_1 ne 2 then giveinad=0; else giveinad=.; label giveinad='expect to give after death'; if giveinh=1 & wq55_2=1 then giveinth=1; else if giveinh=1 & wq55_2 ne 1 then giveinth=0; else giveinth=.; label giveinth='expect to give to hus. first'; if giveinh=1 & wq55_2=2 then giveintc=1; else if giveinh=1 & wq55_2 ne 2 then giveintc=0; else giveintc=.; label giveintc='expect to give to chld first'; if wq55_3=1 | wq55_3=3 then makewill=1;else makewill=0; label makewill='made/will make a will'; if giveinh=1 & wq55_4=1 then giveints=1; else if giveinh=1 & wq55_4 ne 1 then giveints=0; else giveints=.; label giveints='intend to give sons'; if giveinh=1 & wq55_4=2 then giveintd=1; else if giveinh=1 & wq55_4 ne 2 then giveintd=0; else giveintd=.; label giveintd='intend to give daugs'; if giveinh=1 & wq55_4=3 then giveintc=1; else if giveinh=1 & wq55_4 ne 3 then giveintc=0; else giveintc=.; label giveintc='intend to give chld'; if giveinh=1 & wq55_4=4 then gveintcc=1; else if giveinh=1 & wq55_4 ne 4 then gveintcc=0; else gveintcc=.; label gveintcc='intend to give to child who cares most'; if giveinh=1 & wq55_4=5 then gveintos=1; else if giveinh=1 & wq55_4 ne 5 then gveintos=0; else gveintos=.; label gveintos='intend to give eldest son'; if giveinh=1 & wq55_4=6 then gveintod=1; else if giveinh=1 & wq55_4 ne 6 then gveintod=0; else gveintod=.; label gveintod='intend to give eldest daug'; /************************************************ 14. MAINTENANCE IN OLD AGE BY CHILDREN ************************************************/ /* Questions 40 at p. 30 */ v03 = wq42; /* v03 is the pinkw question at p.27 */ wfinan60=v03; if wfinan60=2 then wfinan60=0; label wfinan60= 'thought about finances at 60+?'; if assis1a = 1 or assis2a = 1 or assis3a = 1 or assis4a = 1 or assis5a = 1 or assis6a = 1 or assis7a = 1 or assis8a = 1 then c09=1; else c09=0; if c09=1 then anyhelp=1; if c09=2 then anyhelp=0; if c09=. then anyhelp=0; label anyhelp='get any help from children'; if assis1a=1 then hopmony=1;else hopmony=0; label hopmony='expect money from chld'; if assis2a=1 then hopwork=1;else hopwork=0; label hopwork='expect own work from chld'; if assis3a=1 then hophwork=1;else hophwork=0; label hophwork='expect housework from chld'; if assis4a=1 then hopcare=1;else hopcare=0; label hopcare='expect care from chld when ill'; if assis5a=1 then hopcomp=1;else hopcomp=0; label hopcomp='expect companionship from chld'; if assis6a=1 then hopord=1;else hopord=0; label hopord='expect ordination from chld'; if assis7a=1 then hopfprid=1;else hopfprid=0; label hopfprid='expect prid from chld'; if assis8a=1 then hopafune=1;else hopafune=0; label hopafune='expect funeral from chld'; if assis1b=1 | hopmony=1 then phopmony=1;else phopmony=0; label phopmony='hopmony with prompting'; if assis2b=1 | hopwork=1 then phopwork=1;else phopwork=0; label phopwork='hopwork with prompting'; if assis3b=1 | hophwork=1 then phphwork=1;else phphwork=0; label phphwork='hophwork with prompting'; if assis4b=1 | hopcare=1 then phopcare=1;else phopcare=0; label phopcare='hopcare with prompting'; if assis5b=1 | hopcomp=1 then phopcomp=1;else phopcomp=0; label phopcomp='hopcomp with prompting'; if assis6b=1 | hopord=1 then phopord=1;else phopord=0; label phopord='hopord with prompting'; if assis7b=1 | hopfprid=1 then phpfprid=1;else phpfprid=0; label phpfprid='hopprid with prompting'; if assis8b=1 | hopafune=1 then phpafune=1;else phpafune=0; label phpafune='hopafune with prompting'; if assis1c = 1 then mmimp = 1; else mmimp = 0; label mmimp = 'Financial help is most imp'; if assis2c = 1 then owmimp = 1; else owmimp = 0; label owmimp = 'Help in own work/farm most imp'; if assis3c = 1 then hwmimp = 1; else hwmimp = 0; label hwmimp = 'Help in housework most imp'; if assis4c = 1 then cimimp = 1; else cimimp = 0; label cimimp = 'Care when ill most imp'; if assis5c =1 then cmpmimp = 1; else cmpmimp = 0; label cmpmimp = 'Companionship most imp'; if assis6c = 1 then ordmimp = 1; else ordmimp = 0; label ordmimp = 'Orination most important'; if assis7c = 1 then fprmimp = 1; else fprmimp = 0; label fprmimp = 'Family pride/prestige most imp'; if assis8c = 1 then othmimp = 1; else othmimp = 0; label othmimp = 'Other things most imp'; if ordmimp = 1 | cmpmimp = 1 | fprmimp = 1 | othmimp = 1 then elsemimp = 1; else elsemimp = 0; label elsemimp = 'Ord + Cmp + Fpr + Othare mimp'; if owmimp = 1 | hwmimp = 1 then workasst = 1; else workasst = 0; label workasst = 'Assistance in work most imp'; if mmimp ne 1 & owmimp ne 1 & hwmimp ne 1 & cimimp ne 1 & cmpmimp ne 1 & ordmimp ne 1 & fprmimp ne 1 & othmimp ne 1 then assisres = .; else assisres = 1; label assisres = 'Response to the rankings'; if mmimp = 1 | cimimp = 1 then careimp = 1; else careimp = 0; label careimp = 'care when old important'; if assis1d=1 | phopmony=1 then whopmony=1;else whopmony=0; label whopmony='asked if phopmony is needed'; if assis2d=1 | phopwork=1 then whopwork=1;else whopwork=0; label whopwork='asked if phopwork is needed'; if assis3d=1 | phphwork=1 then whphwork=1;else whphwork=0; label whphwork='asked if phphwork is needed'; if assis4d=1 | phopcare=1 then whopcare=1;else whopcare=0; label whopcare='asked if phopcare is needed'; if assis5d=1 | phopcomp=1 then whopcomp=1;else whopcomp=0; label whopcomp='asked if phopcomp is needed'; if assis6d=1 | phopord=1 then whopord=1;else whopord=0; label whopord='asked if phopord is needed'; if assis7d=1 | phpfprid=1 then whpfprid=1;else whpfprid=0; label whpfprid='asked if phopprid is needed'; if assis8d=1 | phpafune=1 then whpafune=1;else whpafune=0; label whpafune='asked if phopfune is needed'; if assis1e=1 | whopmony=1 then bmony=1;else bmony=0; label bmony='chld would bestow whopmony'; if assis2e=1 | whopwork=1 then bwork=1;else bwork=0; label bwork='chld would bestow whopwork'; if assis3e=1 | whphwork=1 then bhwork=1;else bhwork=0; label bhwork='chld would bestow whphwork'; if assis4e=1 | whopcare=1 then bcare=1;else bcare=0; label bcare='chld would bestow whopcare'; if assis5e=1 | whopcomp=1 then bcomp=1;else bcomp=0; label bcomp='chld would bestow whopcomp'; if assis6e=1 | whopord=1 then bord=1;else bord=0; label bord='chld would bestow whopord'; if assis7e=1 | whpfprid=1 then bfprid=1;else bfprid=0; label bfprid='chld would bestow whopprid'; if assis8e=1 | whpafune=1 then bafune=1;else bafune=0; label bafune='chld would bestow whopfune'; /* Questions 41 at p. 31 */ if wq41=1 then anyhelpt=1;else anyhelpt=0; label anyhelpt=' ever assisted par?'; if wq41=1 & wq41_1a=1 then finhelpt=1;else finhelpt=0; label finhelpt='financial help to par'; if wq41=1 & wq41_1b=1 then worhelpt=1;else worhelpt=0; label worhelpt='own work/farming help to par'; if wq41=1 & wq41_1c=1 then hwohelpt=1;else hwohelpt=0; label hwohelpt='housework help to par'; if wq41=1 & wq41_1d=1 then carehlpt=1;else carehlpt=0; label carehlpt='care help to par when ill'; if wq41=1 & wq41_1e=1 then comhelpt=1;else comhelpt=0; label comhelpt='companionship help to par'; if wq41=1 & wq41_1f=1 then ordhelpt=1;else ordhelpt=0; label ordhelpt='ordination help to par'; if wq41=1 & wq41_1g=1 then afunhlpt=1;else afunhlpt=0; label afunhlpt='arrange funeral help to par'; if wq41=1 & wq41_1h=1 then ohelpt=1;else ohelpt=0; label ohelpt='other help to par'; if wq42=1 then finan60=1;else finan60=0; label finan60='thought on finan. situ. at 60'; /* Questions 43 at p. 32 */ if source1 = 1 then sonsupp = 1; else sonsupp = 0; label sonsupp = 'son exp to support in old age'; if source2=1 then dausupp=1;else dausupp=0; label dausupp='daug exp to supp in old age'; if source3=1 then sibsupp=1;else sibsupp=0; label sibsupp='bro./sis. exp to support'; if source4=1 then orelsupp=1;else orelsupp=0; label orelsupp='other rel. exp to support'; if source5=1 then frnesupp=1;else frnesupp=0; label frnesupp='fri./neigb. exp to supp in old age'; if source6=1 then farmsupp=1;else farmsupp=0; label farmsupp='farm exp to supp in old age'; if source7=1 then animsupp=1;else animsupp=0; label animsupp='animals exp to supp in old age'; if source8=1 then ownwsupp=1;else ownwsupp=0; label ownwsupp='ownwork exp. to supp in old age'; if source9=1 then spwksupp=1;else spwksupp=0; label spwksupp='spouse work exp to supp in old age'; if source10=1 then busincsp=1;else busincsp=0; label busincsp='busness exp to supp in old age'; if source11=1 then oincsupp=1;else oincsupp=0; label oincsupp='other work exp to supp in old age'; if source12=1 then savsupp=1;else savsupp=0; label savsupp='savings exp to supp in old age'; if source13=1 then penssupp=1;else penssupp=0; label penssupp='pension exp to supp in old age'; if source14=1 then inssupp=1;else inssupp=0; label inssupp='insurance exp to supp in old age'; if source15=1 then rentsupp=1;else rentsupp=0; label rentsupp='rent exp to supp in old age'; sonrank=0; if rank1=1 then sonrank=3; if rank1=2 then sonrank=2; if rank1=3 then sonrank=1; label sonrank='rank of sons support'; daurank=0; if rank2=1 then daurank=3; if rank2=2 then daurank=2; if rank2=3 then daurank=1; label daurank='rank of daugs support'; sibrank=0; if rank3=1 then sibrank=3; if rank3=2 then sibrank=2; if rank3=3 then sibrank=1; label sibrank='rank of bro/sis support'; orelrank=0; if rank4=1 then orelrank=3; if rank4=2 then orelrank=2; if rank4=3 then orelrank=1; label orelrank='rank of oth. rela. support'; frnerank=0; if rank5=1 then frnerank=3; if rank5=2 then frnerank=2; if rank5=3 then frnerank=1; label frnerank='rank of friend/neig support'; farmrank=0; if rank6=1 then farmrank=3; if rank6=2 then farmrank=2; if rank6=3 then farmrank=1; label farmrank='rank of farm support'; animrank=0; if rank7=1 then animrank=3; if rank7=2 then animrank=2; if rank7=3 then animrank=1; label animrank='rank of animals support'; ownwrank=0; if rank8=1 then ownwrank=3; if rank8=2 then ownwrank=2; if rank8=3 then ownwrank=1; label ownwrank='rank of own work support'; spwrank=0; if rank9=1 then spwrank=3; if rank9=2 then spwrank=2; if rank9=3 then spwrank=1; label spwrank='rank of spouse work support'; busirank=0; if rank10=1 then busirank=3; if rank10=2 then busirank=2; if rank10=3 then busirank=1; label busirank='rank of business support'; oincrank=0; if rank11=1 then oincrank=3; if rank11=2 then oincrank=2; if rank11=3 then oincrank=1; label oincrank='rank of other work support'; savrank=0; if rank12=1 then savrank=3; if rank12=2 then savrank=2; if rank12=3 then savrank=1; label savrank='rank of savings support'; pensrank=0; if rank13=1 then pensrank=3; if rank13=2 then pensrank=2; if rank13=3 then pensrank=1; label pensrank='rank of pension support'; insrank=0; if rank14=1 then insrank=3; if rank14=2 then insrank=2; if rank14=3 then insrank=1; label insrank='rank of insurance support'; rentrank=0; if rank15=1 then rentrank=3; if rank15=2 then rentrank=2; if rank15=3 then rentrank=1; label rentrank='rank of rent support'; /* If top 2 ranks : NOT USED if wcntchld = 1 and (sonrank >= 2 | daurank >=2) then childsup = 1; else childsup =0; label childsup = 'Importance of children as support'; if (source3 = 1 | source4 = 1 | source5 = 1) and (sibrank >= 2 | orelrank >= 2 | frnerank >=2) then relsup=1; else relsup = 0; label relsup = 'Importance of relatives as support'; if (source6 = 1 | source7 = 1 | source8 = 1 | source9 = 1 | source10 = 1 | source11 = 1) and (farmrank >=2 | animrank >=2 | ownwrank >= 2 | spwrank >=2 | busirank >=2 | oincrank >=2) then worksup = 1; else worksup = 0; label worksup = 'Importance of income as support'; if (source12 = 1 | source13 = 1 | source14 = 1 | source15 = 1) and (savrank >=2 | pensrank >=2 | insrank >=2 | rentrank >=2) then savpsup = 1; else savpsup = 0; label savpsup = 'Savings, pension, insurance as support'; */ /* If top rank only */ if (sonsupp = 1 | dausupp = 1) and (sonrank = 3 | daurank =3) then chldsimp = 1; else chldsimp =0; label chldsimp = 'Importance of children as support'; if (source3 = 1 | source4 = 1 | source5 = 1) and (sibrank =3 | orelrank =3 | frnerank =3) then relsup=1; else relsup = 0; label relsup = 'Importance of relatives as support'; if (source6 = 1 | source7 = 1 | source8 = 1 | source9 = 1 | source10 = 1 | source11 = 1) and (farmrank =3 | animrank =3 | ownwrank =3 | spwrank =3 | busirank =3 | oincrank =3) then worksup = 1; else worksup = 0; label worksup = 'Importance of work as support'; if (source12 = 1 | source13 = 1 | source14 = 1 | source15 = 1) and (savrank =3| pensrank =3| insrank =3| rentrank =3) then savpsup = 1; else savpsup = 0; label savpsup = 'Savings, pension, insurance as support'; if wq44a=1 then noneed=1;else noneed=0; label noneed='noneed on chld s help'; if wq44b=1 then chpoor=1;else chpoor=0; label chpoor='chld are poor'; if wq44c=1 then lefthome=1;else lefthome=0; label lefthome='chld left home'; if wq44d=1 then notloyal=1;else notloyal=0; label notloyal='chld not so filial'; if wq44e=1 then notrelia=1;else notrelia=0; label notrelia='can never count on chld'; if wq44f=1 then chtoofew=1;else chtoofew=0; label chtoofew='not enough chld'; if wq44g=1 then chchildr=1;else chchildr=0; label chchildr='chld have too many chld'; if wq44h=1 then otherexc=1;else otherexc=0; label otherexc='other reasons'; if (source1 = 2 | source1 = 3) and (source2 = 2 | source2 = 3) then exp_not = 1; else exp_not = 0; label exp_not = 'Do not expect children to help when old'; /* SURECHIN */ if (sonrank = 2 | daurank =2) and wq45 = 1 then surechin = 7; if (sonrank = 3 | daurank =3) and wq45 = 1 then surechin = 9; if (sonrank >= 2 | daurank >=2) and wq45 = 2 then surechin = 5; if (sonrank >= 2 | daurank >=2) and wq45 = 3 then surechin = 3; if (sonrank <2 and daurank<2) and (wq44a = 1 | wq44f = 1 | wq44g = 1 | wq44h = 1) then surechin = .; if (sonrank <2 and daurank<2) and (wq44c = 1 | wq44d = 1 | wq44e = 1) then surechin = 1; label surechin = 'Index of surety of retun from child'; suresq = surechin*surechin; /************************************************ 15. OPINION ON ECONOMIC CONDITIONS ************************************************/ /* Questions 50, 51 at p. 37 */ if wq50=1 then finfbetr=1;else finfbetr=0; label finfbetr='finan. better in 10 yrs'; if wq50=3 then finfwors=1;else finfwors=0; label finfwors='finan. worse in 10 yrs'; if wq51=1 | wq51=2 then fin60adq=1;else fin60adq=0; label fin60adq='living std adequate in 60'; if wq51=3 then fin60ina=1;else fin60ina=0; label fin60ina='living std inadequate'; /************************************************ 16. OTHER OPINIONS *********************************************** */ /* expoccse = 1.7798604 + (0.0811358 * inc_chg); label expoccse = 'Estimate for expoccse'; */ occs_loy = wcntchld * expoccse; label occs_loy = 'Interaction: wcntchld * expoccse'; supp_loy = chldsimp * surechin; savpint = savpsup * steriled; label savpint = 'savpsup * steriled'; helpint = helpfrom * steriled; label helpint = 'helpfrom * steriled'; wprimint = wprim * steriled; label wprimint = 'wprim * steriled'; wsechint = wsech * steriled; label wsechint = 'wsech * steriled'; muthelp = helpfrom * anyhelpt; /***** EXTRA INFO ****** THE COMPLEX DEFINITION: NOT USED surechin = 0; if (sonrank=3 and daurank =3) & wq45=1 then surechin=10; if ((sonrank=3 and daurank <3) | (sonrank <3 and daurank =3)) & wq45 = 1 then surechin = 9; if (sonrank=3 and daurank =3) & wq45=2 then surechin=6; if ((sonrank=3 and daurank <3) | (sonrank <3 and daurank =3)) & wq45 = 2 then surechin = 5; if (sonrank=3 and daurank =3) & wq45=3 then surechin=3; if ((sonrank=3 and daurank <3) | (sonrank <3 and daurank =3)) & wq45 = 3 then surechin = 2; if ((sonrank =2 and daurank <=2) | (sonrank <=2 and daurank =2)) & wq45 =1 then surechin = 7; if ((sonrank =2 and daurank <=2) | (sonrank <=2 and daurank =2)) & wq45 = 2 then surechin = 4; if (sonrank = 1 and daurank = 1) then surechin = 1; if (sonrank <2 and daurank<2) and (wq44c = 1 | wq44d = 1 | wq44e = 1) then surechin = 0; if (sonrank <2 and daurank<2) and (wq44a = 1 | wq44f = 1 | wq44g = 1 | wq44h = 1) then surechin = .; label surechin='certainty index on chld s support'; */ /* THE SIMPLE DEFINITION: Not used surechi2 = 0; if wq45 =1 then surechi2 = 1; else surechi2 = 0; */ /* AN INTERMEDIATE DEFINITION: (keeping loyalty separate from expectation of support: the original definition. Not used. if (sonrank >= 2 | daurank >=2) and wq45 = 1 then surechin = 4; if (sonrank >= 2 | daurank >=2) and wq45 = 2 then surechin = 3; if (sonrank >= 2 | daurank >=2) and wq45 = 3 then surechin = 2; if (sonrank <2 and daurank<2) and (wq44a = 1 | wq44f = 1 | wq44g = 1 | wq44h = 1) then surechin = .; if (sonrank <2 and daurank<2) and (wq44c = 1 | wq44d = 1 | wq44e = 1) then surechin = 0; */ /* SPLINES (using splines) Not used if (sonrank = 3 | daurank =3) and wq45 = 1 then surech1 = 1; else surech1 = 0; if (sonrank = 2 | daurank =2) and wq45 = 1 then surech2 = 1; else surech2 = 0; if (sonrank >= 2 | daurank >=2) and wq45 = 2 then surech3 = 1; else surech3 = 0; if (sonrank >= 2 | daurank >=2) and wq45 = 3 then surech4=1; else surech4 = 0; if (sonrank <2 and daurank<2) and (wq44a = 1 | wq44f = 1 | wq44g = 1 | wq44h = 1) then surechin = .; if (sonrank <2 and daurank<2) and (wq44c = 1 | wq44d = 1 | wq44e = 1) then surechin = 0; */ /* DETAILED PRE-FINAL DEFINITION: (not used) if (sonrank = 3 | daurank =3) and wq45 = 1 then surechin = 9; if (sonrank = 3 | daurank =3) and wq45 = . and (wq44a = 1 | wq44b = 1 | wq44f = 1 | wq44g = 1 | wq44h = 1 | wq44h = 2 | wq44h = 3 | wq44h = 4 | wq44h = 5 ) then surechin = 5; if (sonrank = 3 | daurank =3) and wq45 = . and (wq44c = 1 | wq44d = 1 | wq44e = 1) then surechin = 1; if (sonrank = 2 | daurank =2) and wq45 = 1 then surechin = 7; if (sonrank >= 2 | daurank >=2) and wq45 = 2 then surechin = 5; if (sonrank >= 2 | daurank >=2) and wq45 = 3 then surechin = 3; if (sonrank <2 and daurank<2) and (wq44a = 1 |