libname zh '~/taiwan/fies/sasdata'; options ls=72; %macro one(q); DATA zh.house&q; SET zh.new&q; KEEP /* information about the household/household head */ hhid areacode urban serial agrtype agr_area agr_work weight /* household income & outlay variables */ htotinc hhirepay hpay1 hpay2 hretpay hothpart hpay3 hovertim hawards hempins heinsnhi hfringe howninc hagrinc htreeinc hfishinc hbusinc hexecinc hpropinc hintinc hinvinc hothprop hestrent hregtran hpritran hgovtran hlowtran holdtran hfrmtran hgovgei hgovnhi hothtrng hbenins hbengei hbennhi hbustran hlifeben hothtran habrtran hmiscinc htotexp hintexp hhosloan hothloan hregtpay hpritpay hpritmar hpritchr hpritoth hgovtpay hproptax hinctax hothtax hothpayg hsocins hpgeiins hpliins hpsiins hpnhiins habrpay mtotinc mhirepay mpay1 mpay2 mretpay mothpart mpay3 movertim mawards mempins meinsnhi mfringe mowninc magrinc mtreeinc mfishinc mbusinc mexecinc mpropinc mintinc minvinc mothprop mestrent mregtran mpritran mgovtran mlowtran moldtran mfrmtran mgovgei mgovnhi mothtrng mbenins mbengei mbennhi mbustran mlifeben mothtran mabrtran mmiscinc mtotexp mintexp mhosloan mothloan mregtpay mpritpay mpritmar mpritchr mpritoth mgovtpay mproptax minctax mothtax mothpayg msocins mpgeiins mpliins mpsiins mpnhiins mabrpay /* Household consumption exp variables */ consexp foodstuf primary milk fruits othfood giftexp boardexp totdrink nonalcoh alcohol tobacco clotfoot clothing shoes totrent actrent estown estalloc upkeep waterexp hholdprm totfuel electric gasfuel othfuel totappl furnitur textile durables othappl tothkeep hhlabor hhservic othhkeep tothealt medequip inoutins medicine medprem mednhi totcomm equippur equiprun transuse othcomm motprem totrecr travexp recrexp bookexp recequip school miscexp othserv finserv hygiene hairexp foodhall nonfmarr othmisc nonsprem cap_gain cap_loss captrec captpaid /* Hosehold equipment variables */ colortv ldcdplay video stereo piano videogam vcr cable computer tele answer fax modem auto motorcyc oven acheat dehumid washer drier dishwash kitchfan vaccum geyser fountain microwav newspap periodic /* Housing variables */ ownhome rental allocate otherown res_use bus_use otheruse story_1 story_23 story_45 story_6 wateruse nowater loan noloan ownpark rentpark nopark landarea bldarea leasres leasbus leasboth noleas ; htotinc = totinc0; hhirepay = hirepay0; hpay1 = pay1_0; hpay2 = pay2_0; hretpay = retpay0; hothpart = othpart0; hpay3 = pay3_0; hovertim = overtim0; hawards = awards0; hempins = empins0; heinsnhi = einsnhi0; hfringe = fringe0; howninc = owninc0; hagrinc = agrinc0; htreeinc = treeinc0; hfishinc = fishinc0; hbusinc = businc0; hexecinc = execinc0; hpropinc = propinc0; hintinc = intinc0; hinvinc = invinc0; hothprop = othprop0; hestrent = estrent0; hregtran = regtran0; hpritran = pritran0; hgovtran = govtran0; hlowtran = lowtran0; holdtran = oldtran0; hfrmtran = frmtran0; hgovgei = govgei0; hgovnhi = govnhi0; hothtrng = othtrng0; hbenins = benins0; hbengei = bengei0; hbennhi = bennhi0; hbustran = bustran0; hlifeben = lifeben0; hothtran = othtran0; habrtran = abrtran0; hmiscinc = miscinc0; htotexp = totexp0; hintexp = intexp0; hhosloan = hosloan0; hothloan = othloan0; hregtpay = regtpay0; hpritpay = pritpay0; hpritmar = pritmar0; hpritchr = pritchr0; hpritoth = pritoth0; hgovtpay = govtpay0; hproptax = proptax0; hinctax = inctax0; hothtax = othtax0; hothpayg = othpayg0; hsocins = buspay0; hpgeiins = pgeiins0; hpliins = pliins0; hfarmins = farmins0; hfishins = fishins0; hpsiins = psiins0; hpnhiins = pnhiins0; habrpay = abrpay0; mtotinc = totinc9; mhirepay = hirepay9; mpay1 = pay1_9; mpay2 = pay2_9; mretpay = retpay9; mothpart = othpart9; mpay3 = pay3_9; movertim = overtim9; mawards = awards9; mempins = empins9; meinsnhi = einsnhi9; mfringe = fringe9; mowninc = owninc9; magrinc = agrinc9; mtreeinc = treeinc9; mfishinc = fishinc9; mbusinc = businc9; mexecinc = execinc9; mpropinc = propinc9; mintinc = intinc9; minvinc = invinc9; mothprop = othprop9; mestrent = estrent9; mregtran = regtran9; mpritran = pritran9; mgovtran = govtran9; mlowtran = lowtran9; moldtran = oldtran9; mfrmtran = frmtran9; mgovgei = govgei9; mgovnhi = govnhi9; mothtrng = othtrng9; mbenins = benins9; mbengei = bengei9; mbennhi = bennhi9; mbustran = bustran9; mlifeben = lifeben9; mothtran = othtran9; mabrtran = abrtran9; mmiscinc = miscinc9; mtotexp = totexp9; mintexp = intexp9; mhosloan = hosloan9; mothloan = othloan9; mregtpay = regtpay9; mpritpay = pritpay9; mpritmar = pritmar9; mpritchr = pritchr9; mpritoth = pritoth9; mgovtpay = govtpay9; mproptax = proptax9; minctax = inctax9; mothtax = othtax9; mothpayg = othpayg9; msocins = buspay9; mpgeiins = pgeiins9; mpliins = pliins9; mfarmins = farmins9; mfishins = fishins9; mpsiins = psiins9; mpnhiins = pnhiins9; mabrpay = abrpay9; consexp = totcons; LABEL hhid ='Sample household id' weight ='Sample weight' areacode ='Area Code' urban ='Urbanization' serial ='Serial number of households' agrtype = "Farm/nonfarm household" agr_area = "Farm hhold class by cult land size" agr_work = "Farm hhold class by working hours" htotinc = "Total hh earned income" hhirepay = "Compensation of employees" hpay1 = "Full time pay-roll" hpay2 = "Part time and spare time pay-roll" hretpay = "Retirement pay" hothpart = "Other part time payroll" hpay3 = "Other receipts or subsidies" hovertim = "Overtime pay" hawards = "Awards" hempins = "Insurance by employers" heinsnhi = "Insurance of NHI by employers" hfringe = "Fringe and death benefits" howninc = "Enterpreneurial income" hagrinc = "Agricultural & livestock income" htreeinc = "Net forest income" hfishinc = "Net fishing income" hbusinc = "Net operating surplus" hexecinc = "Net professional income" hpropinc = "Net property income" hintinc = "Interest income" hinvinc = "Investment income" hothprop = "Net property income - others" hestrent = "Imputed rent income" hregtran = "Current transfer receipts" hpritran = "Transfers from individuals" hgovtran = "Transfers from govt." hlowtran = "Tr from govt - low income hholds" holdtran = "Tr from govt - old-age allowance" hfrmtran = "Tr from govt - old farmer annuity" hgovgei = "Ins of GEI, LI, FHI, & SI by govt" hgovnhi = "Insurance of NHI by govt" hothtrng = "Tr from govt - others" hbenins = "Benefits of social insurance" hbengei = "Benefit of GEI, LI, FHI, & SI" hbennhi = "Benefit of NHI" hbustran = "Transfers from enterprises" hlifeben = "Cash benef of life & casualty insurance" hothtran = "Other transfers from enterprises" habrtran = "Transfers from abroad" hmiscinc = "Miscellaneous receipts" htotexp = "Total nonconsumption expenditure" hintexp = "Interest exp" hhosloan = "Interest - house loans" hothloan = "Interest - others" hregtpay = "Current transfer expenditures" hpritpay = "Transfers to private" hpritmar = "Tr to priv - exp of mar, bir & funeral" hpritchr = "Tr to private - charities" hpritoth = "Tr to private - others" hgovtpay = "Transfers to government" hproptax = "Tr to govt - house tax & land tax" hinctax = "Tr to govt - income tax" hothtax = "Tr to govt - other direct tax" hothpayg = "Tr to govt - others" hsocins = "Social insurance" hpgeiins = "Expenditure on GEI" hpliins = "Expenditure on LI" hfarmins = "Exp on farmer's health insurance" hfishins = "Exp on fisherman's health insurance" hpsiins = "Expenditure on SI" hpnhiins = "Expenditure on NHI" habrpay = "Tranfers to abroad" mtotinc = "Total hh earned income (409)" mhirepay = "Compensation of employees (199)" mpay1 = "Full time pay-roll (219)" mpay2 = "Part time and spare time pay-roll(229)" mretpay = "Retirement pay (159)" mothpart = "Other part time payroll (169)" mpay3 = "Other receipts or subsidies (239)" movertim = "Overtime pay (119)" mawards = "Awards (129)" mempins = "Insurance by employers (139)" meinsnhi = "Insurance of NHI by employers (709)" mfringe = "Fringe and death benefits (149)" mowninc = "Enterpreneurial income (249)" magrinc = "Agricultural & livestock income (269)" mtreeinc = "Net forest income (279)" mfishinc = "Net fishing income (289)" mbusinc = "Net operating surplus (299)" mexecinc = "Net professional income (329)" mpropinc = "Net property income (339)" mintinc = "Interest income (349)" minvinc = "Investment income (359)" mothprop = "Net property income - others (369)" mestrent = "Imputed rent income (399)" mregtran = "Current transfer receipts (419)" mpritran = "Transfers from individuals (429)" mgovtran = "Transfers from govt. (439)" mlowtran = "Tr from govt - low income hholds (309)" moldtran = "Tr from govt - old-age allowance (319)" mfrmtran = "Tr from govt - old farmer annuity (379)" mgovgei = "Ins of GEI, LI, FHI, & SI by govt (209)" mgovnhi = "Insurance of NHI by govt (959)" mothtrng = "Tr from govt - others (389)" mbenins = "Benefits of social insurance (459)" mbengei = "Benefit of GEI, LI, FHI, & SI (989)" mbennhi = "Benefit of NHI (949)" mbustran = "Transfers from enterprises (449)" mlifeben = "Cash benef of life & casualty ins (469)" mothtran = "Other transfers from enterprises (479)" mabrtran = "Transfers from abroad (489)" mmiscinc = "Miscellaneous receipts (499)" mtotexp = "Total nonconsumption expenditure (609)" mintexp = "Interest exp (549)" mhosloan = "Interest - house loans (519)" mothloan = "Interest - others (529)" mregtpay = "Current transfer expenditures (569)" mpritpay = "Transfers to private (579)" mpritmar = "Tr to pr - exp of mar, bir & funer (559)" mpritchr = "Tr to private - charities (179)" mpritoth = "Tr to private - others (189)" mgovtpay = "Transfers to government (589)" mproptax = "Tr to govt - house tax & land tax (599)" minctax = "Tr to govt - income tax (619)" mothtax = "Tr to govt - other direct tax (629)" mothpayg = "Tr to govt - others (639)" msocins = "Social Insurance (649)" mpgeiins = "Expenditure on GEI (659)" mpliins = "Expenditure on LI (669)" mfarmins = "Exp on farmer's health insurance (679)" mfishins = "Exp on fisherman's health insurance (859)" mpsiins = "Expenditure on SI (869)" mpnhiins = "Expenditure on NHI (689)" mabrpay = "Tranfers to abroad (699)" consexp = "Total consumption exp" foodstuf = "Total food exp" primary = "Main food - exps" milk = "Dairy - exps" fruits = "Fruits - exps" othfood = "Other food - exps" giftexp = "Gifts - exps" boardexp = "Board - exps" totdrink = "Beverage - exps" nonalcoh = "Non-alcoholic beverage - exps" alcohol = "Alcoholic beverage - exps" tobacco = "Tobacco - exps" clotfoot = "Clothing and footwear - exps" clothing = "Clothing - exps" shoes = "Footwear - exps" totrent = "Rent and water charge - exps" actrent = "Rent actual paid" estown = "Imputed rent of self-owned" estalloc = "Imputed rent of issued & leased" upkeep = "Repairs - bldg upkeep exps" waterexp = "Water charge - exps" hholdprm = "Household premiums" totfuel = "Fuel & lighting - exps" electric = "Electric rate - exps" gasfuel = "Gas - exps" othfuel = "Fuel others - exps" totappl = "Furnit. & fam. fac. - exps" furnitur = "Furniture - exps" textile = "Textile furnishing - exps" durables = "Durable hhold equip - exps" othappl = "Fur & fam fac others - exps" tothkeep = "Household operation - exps" hhlabor = "Domestic seravants - exps" hhservic = "Service to family - exps" othhkeep = "Other household oper. - exps" tothealt = "Medical care & senit. - exps" medequip = "Medical equip. and instr. - exps" inoutins = "Treatment in hospital - exps" medicine = "Exp of medical article" medprem = "Personal accident & medical premiums" mednhi = "Medical consumption of NHI" totcomm = "Transport and comm. - exps" equippur = "Pur. of pers. trans. equip. - exps" equiprun = "Oper. & maint. of per. tr. eq. - exps" transuse = "Purchased transportation - exps" othcomm = "Other communications - exps" motprem = "Motor vehicle premiums - exps" totrecr = "Exp on recr., educ. & cult." travexp = "Travelling expenses" recrexp = "Recreation service - exps" bookexp = "Newspaper, mag. & stationary - exps" recequip = "Recreation facilities - exps" school = "Exp on educ., cult. & researches" miscexp = "Total miscellaneous exp" othserv = "Other goods not listed - exps" finserv = "Financial service - exps" hygiene = "Personal care - exps" hairexp = "Barber and bath - exps" foodhall = "Food, bev & tob. in rest, ball - exps" nonfmarr = "Gifts (food exclusive) - exps" othmisc = "Miscellaneous expenses (847)" nonsprem = "Misc other nonsaving premiums - exps" cap_gain = "Capital gain" cap_loss = "Capital loss" captrec = "Capital transfers received" captpaid = "Capital transfers paid" colortv = "Color television set" ldcdplay = "Laser disk player" video = "Movie camera" stereo = "stereo" piano = "Piano" videogam = "Video game" vcr = "Video tape recorder" cable = "Cable TV" computer = "Personal computer" tele = "Telephone" answer = "Answer machine" fax = "Fax machine" modem = "Modem" auto = "Sedan vehicle" motorcyc = "Motor bicycle" oven = "Electro-magnetic oven" acheat = "Air conditioner" dehumid = "Dehumidifier" washer = "Washing machine" drier = "Drier" dishwash = "Dsihwasher" kitchfan = "Exhaust fan" vaccum = "Vaccum cleaner" geyser = "Geyser" fountain = "Hot-warm fountain" microwav = "Oven (microwave)" newspap = "Newspaper" periodic = "Magazine" ownhome = "Tenure of dwelling - self-owned" rental = "Tenure of dwelling - rented" allocate = "Tenure of dwelling - issued" otherown = "Tenure of dwelling - leased & others" res_use = "Usage of dwelling - independent" bus_use = "Usage of dwelling - connected" otheruse = "Usage of dwelling - others" story_1 = "Const mat & style - one story" story_23 = "Const mat & style - two or three stories" story_45 = "Const mat & style - four or five stories" story_6 = "Const mat & style - six stories or over" wateruse = "Piped water equip - with usage" nowater = "Piped water equip - none" loan = "Self-owned house loans - having loans" noloan = "Self-owned house loans - none" ownpark = "Parking lot - self-owned" rentpark = "Parking lot - rented" nopark = "Parking lot - none" landarea = "Room nums & area - housing land area" bldarea = "Room nums & area - total room area" leasres = "With leased house - for residence" leasbus = "With leased house - for business" leasboth = "With leased house - for business and residence" noleas = "With leased house - none" ; PROC CONTENTS ; run; %mend; %one(99); %one(00); %one(01); %one(02); %one(03); %include '~/nta/savastata.mac'; %macro convert(aa); data house&aa; set zh.house&aa; %savastata(~/taiwan/fies/fiesdata/,replace); run; %mend; %convert(99); %convert(00); %convert(01); %convert(02); %convert(03);