1 The SAS System 23:52 Sunday, May 14, 2006 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to UNIV OF CA/BERKELEY, Site 0029107012. NOTE: This session is executing on the SunOS 5.8 platform. NOTE: SAS 9.1.3 Service Pack 3 You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html Welcome to SAS 9.1.3 licensed to the UCB Demography Lab For a short time it will be possible to run the old version of sas by typing sas81. Soon, however, this will be the only version availalbe -- I sure hope you like it. NOTE: SAS initialization used: real time 0.23 seconds cpu time 0.11 seconds 1 libname zh '~/taiwan/fies/sasdata'; NOTE: Libref ZH was successfully assigned as follows: Engine: V9 Physical Name: /home/brass/hdir0/ebenstei/taiwan/fies/sasdata 1 ! 2 options ls=72; 3 4 %macro one(q); 5 6 data zh.data&q; 7 set zh.new&q; * import the SAS data; 8 9 keep hhid weight areacode 9 ! urban 10 serial agrtype agr_area 10 ! agr_work 11 id1-id8 totinc1-totinc8 hirepay1-hirepay8 11 ! pay1_1-pay1_8 12 pay2_1-pay2_8 retpay1-retpay8 othpart1-othpart8 12 ! pay3_1-pay3_8 13 overtim1-overtim8 awards1-awards8 empins1-empins8 13 ! einsnhi1-einsnhi8 14 fringe1-fringe8 owninc1-owninc8 agrinc1-agrinc8 14 ! treeinc1-treeinc8 15 fishinc1-fishinc8 businc1-businc8 execinc1-execinc8 15 ! propinc1-propinc8 16 intinc1-intinc8 invinc1-invinc8 othprop1-othprop8 16 ! estrent1-estrent8 2 The SAS System 23:52 Sunday, May 14, 2006 17 regtran1-regtran8 pritran1-pritran8 govtran1-govtran8 17 ! lowtran1-lowtran8 18 oldtran1-oldtran8 frmtran1-frmtran8 govgei1-govgei8 18 ! govnhi1-govnhi8 19 othtrng1-othtrng8 benins1-benins8 bengei1-bengei8 19 ! bennhi1-bennhi8 20 bustran1-bustran8 lifeben1-lifeben8 othtran1-othtran8 20 ! abrtran1-abrtran8 21 miscinc1-miscinc8 totexp1-totexp8 intexp1-intexp8 21 ! hosloan1-hosloan8 22 othloan1-othloan8 regtpay1-regtpay8 pritpay1-pritpay8 22 ! pritmar1-pritmar8 23 pritchr1-pritchr8 pritoth1-pritoth8 govtpay1-govtpay8 23 ! proptax1-proptax8 24 inctax1-inctax8 othtax1-othtax8 othpayg1-othpayg8 24 ! buspay1-buspay8 25 pgeiins1-pgeiins8 pliins1-pliins8 farmins1-farmins8 25 ! fishins1-fishins8 26 psiins1-psiins8 pnhiins1-pnhiins8 abrpay1-abrpay8; 27 28 data zh.earner&q; 29 set zh.data&q; 30 31 keep hhid weight areacode urban serial 31 ! agrtype agr_area 32 agr_work 33 personid totinc hirepay pay1 pay2 33 ! retpay othpart 34 pay3 overtim awards empins einsnhi 34 ! fringe owninc 35 agrinc treeinc fishinc businc execinc 35 ! propinc intinc 36 invinc othprop estrent regtran pritran 36 ! govtran lowtran 37 oldtran frmtran govgei govnhi othtrng 37 ! benins bengei 38 bennhi bustran lifeben othtran abrtran 38 ! miscinc totexp 39 intexp hosloan othloan regtpay pritpay 39 ! pritmar pritchr 40 pritoth govtpay proptax inctax othtax 40 ! othpayg socins 41 pgeiins pliins farmins fishins psiins 41 ! pnhiins abrpay; 42 43 array ids{8} id1-id8; 44 array tot{8} totinc1-totinc8; 45 array hir{8} hirepay1-hirepay8; 46 array pay1_s{8} pay1_1-pay1_8; 47 array pay2_s{8} pay2_1-pay2_8; 48 array retp{8} retpay1-retpay8; 49 array othprt{8} othpart1-othpart8; 50 array pay3_s{8} pay3_1-pay3_8; 51 array overt{8} overtim1-overtim8; 52 array awrds{8} awards1-awards8; 53 array empin{8} empins1-empins8; 54 array einsnh{8} einsnhi1-einsnhi8; 55 array frng{8} fringe1-fringe8; 3 The SAS System 23:52 Sunday, May 14, 2006 56 array ownin{8} owninc1-owninc8; 57 array agrin{8} agrinc1-agrinc8; 58 array treein{8} treeinc1-treeinc8; 59 array fishin{8} fishinc1-fishinc8; 60 array busin{8} businc1-businc8; 61 array execin{8} execinc1-execinc8; 62 array propin{8} propinc1-propinc8; 63 array intin{8} intinc1-intinc8; 64 array invin{8} invinc1-invinc8; 65 array othprp{8} othprop1-othprop8; 66 array estrnt{8} estrent1-estrent8; 67 array regtrn{8} regtran1-regtran8; 68 array pritrn{8} pritran1-pritran8; 69 array govtrn{8} govtran1-govtran8; 70 array lowtrn{8} lowtran1-lowtran8; 71 array oldtrn{8} oldtran1-oldtran8; 72 array frmtrn{8} frmtran1-frmtran8; 73 array govge{8} govgei1-govgei8; 74 array govnh{8} govnhi1-govnhi8; 75 array othtrg{8} othtrng1-othtrng8; 76 array benin{8} benins1-benins8; 77 array benge{8} bengei1-bengei8; 78 array bennh{8} bennhi1-bennhi8; 79 array bustrn{8} bustran1-bustran8; 80 array lifebn{8} lifeben1-lifeben8; 81 array othtrn{8} othtran1-othtran8; 82 array abrtrn{8} abrtran1-abrtran8; 83 array miscin{8} miscinc1-miscinc8; 84 array totex{8} totexp1-totexp8; 85 array intex{8} intexp1-intexp8; 86 array hosln{8} hosloan1-hosloan8; 87 array othln{8} othloan1-othloan8; 88 array regtp{8} regtpay1-regtpay8; 89 array pritp{8} pritpay1-pritpay8; 90 array pritmr{8} pritmar1-pritmar8; 91 array pritcr{8} pritchr1-pritchr8; 92 array pritot{8} pritoth1-pritoth8; 93 array govtp{8} govtpay1-govtpay8; 94 array proptx{8} proptax1-proptax8; 95 array inctx{8} inctax1-inctax8; 96 array othtx{8} othtax1-othtax8; 97 array othpg{8} othpayg1-othpayg8; 98 array busp{8} buspay1-buspay8; 99 array pgeiin{8} pgeiins1-pgeiins8; 100 array pliin{8} pliins1-pliins8; 101 array farmin{8} farmins1-farmins8; 102 array fishns{8} fishins1-fishins8; 103 array psiin{8} psiins1-psiins8; 104 array pnhiin{8} pnhiins1-pnhiins8; 105 array abrp{8} abrpay1-abrpay8; 106 107 do j=1 to 8; 108 if (ids{j} ne . and ids{j} ne 0) then do; 109 personid = ids{j}; 110 totinc = tot{j}; 111 hirepay = hir{j}; 112 pay1 = pay1_s{j}; 113 pay2 = pay2_s{j}; 4 The SAS System 23:52 Sunday, May 14, 2006 114 retpay = retp{j}; 115 othpart = othprt{j}; 116 pay3 = pay3_s{j}; 117 overtim = overt{j}; 118 awards = awrds{j}; 119 empins = empin{j}; 120 einsnhi = einsnh{j}; 121 fringe = frng{j}; 122 owninc = ownin{j}; 123 agrinc = agrin{j}; 124 treeinc = treein{j}; 125 fishinc = fishin{j}; 126 businc = busin{j}; 127 execinc = execin{j}; 128 propinc = propin{j}; 129 intinc = intin{j}; 130 invinc = invin{j}; 131 othprop = othprp{j}; 132 estrent = estrnt{j}; 133 regtran = regtrn{j}; 134 pritran = pritrn{j}; 135 govtran = govtrn{j}; 136 lowtran = lowtrn{j}; 137 oldtran = oldtrn{j}; 138 frmtran = frmtrn{j}; 139 govgei = govge{j}; 140 govnhi = govnh{j}; 141 othtrng = othtrg{j}; 142 benins = benin{j}; 143 bengei = benge{j}; 144 bennhi = bennh{j}; 145 bustran = bustrn{j}; 146 lifeben = lifebn{j}; 147 othtran = othtrn{j}; 148 abrtran = abrtrn{j}; 149 miscinc = miscin{j}; 150 totexp = totex{j}; 151 intexp = intex{j}; 152 hosloan = hosln{j}; 153 othloan = othln{j}; 154 regtpay = regtp{j}; 155 pritpay = pritp{j}; 156 pritmar = pritmr{j}; 157 pritchr = pritcr{j}; 158 pritoth = pritot{j}; 159 govtpay = govtp{j}; 160 proptax = proptx{j}; 161 inctax = inctx{j}; 162 othtax = othtx{j}; 163 othpayg = othpg{j}; 164 socins = busp{j}; 165 pgeiins = pgeiin{j}; 166 pliins = pliin{j}; 167 farmins = farmin{j}; 168 fishins = fishns{j}; 169 psiins = psiin{j}; 170 pnhiins = pnhiin{j}; 171 abrpay = abrp{j}; 5 The SAS System 23:52 Sunday, May 14, 2006 172 output; 173 end; 174 end; 175 176 label 177 hhid ='Sample household id' 178 personid ='Internal hhid' 179 weight ='Sample weight' 180 areacode ='Area Code' 181 urban ='Urbanization' 182 serial ='Serial number of households' 183 agrtype = "Farm/nonfarm household" 184 agr_area = "Farm hhold class by cult land size" 185 agr_work = "Farm hhold class by working hours" 186 187 personid = "Code of member in the hhold" 188 totinc = "Total Receipt" 189 hirepay = "Compensation of employees" 190 pay1 = "Full time pay-roll" 191 pay2 = "Part time and spare time pay-roll" 192 retpay = "Retirement pay" 193 othpart = "Other part time payroll" 194 pay3 = "Other receipts or subsidies" 195 overtim = "Overtime pay" 196 awards = "Awards" 197 empins = "Ins of GEI, LI, FHI, & SI by employers" 198 einsnhi = "Insurance of NHI by employers" 199 fringe = "Fringe and death benefits" 200 owninc = "Enterpreneurial income" 201 agrinc = "Agricultural & livestock income" 202 treeinc = "Net forest income" 203 fishinc = "Net fishing income" 204 businc = "Net operation surplus" 205 execinc = "Net professional income" 206 propinc = "Net property income" 207 intinc = "Interest income" 208 invinc = "Investment income" 209 othprop = "Others - property income" 210 estrent = "Imputed rent income" 211 regtran = "Current transfer receipts" 212 pritran = "Transfers from individuals" 213 govtran = "Transfers from govt." 214 lowtran = "Tr from govt - low inc hholds" 215 oldtran = "Tr from govt - old-age allowance" 216 frmtran = "Tr from govt - old farmer annuity" 217 govgei = "Ins of GEI, LI, FHI, & SI by govt" 218 govnhi = "Insurance of NHI by government" 219 othtrng = "Tr from govt others" 220 benins = "Benefits of social insurance" 221 bengei = "Benefit of GEI, LI, FHI, and SI" 222 bennhi = "Benefit of NHI" 223 bustran = "Transfers from enterprises" 224 lifeben = "Cash benefit of life of life & casualty 224 ! ins" 225 othtran = "Other transfers from enterprises" 226 abrtran = "Transfers from abroad" 227 miscinc = "Miscellaneous receipts" 228 totexp = "Total nonconsumption expenditure" 6 The SAS System 23:52 Sunday, May 14, 2006 229 intexp = "Interest expenditure" 230 hosloan = "Interest - house loans" 231 othloan = "Interest - others" 232 regtpay = "Current transfers expenditures" 233 pritpay = "Transfers to individuals" 234 pritmar = "Priv tr exp - mar birth & funeral" 235 pritchr = "Priv tr exp - charities" 236 pritoth = "Priv tr exp - others" 237 govtpay = "Transfers to government" 238 proptax = "House tax & land tax" 239 inctax = "Income tax" 240 othtax = "Other direct tax" 241 othpayg = "Other transfers to govt." 242 socins = "Social insurance" 243 pgeiins = "Expenditure on GEI" 244 pliins = "Expenditure on LI" 245 farmins = "Expenditure on farmer's health insurance" 246 fishins = "Expenditure on fisherman's health 246 ! insurance" 247 psiins = "Expenditure on SI" 248 pnhiins = "Expenditure on NHI" 249 abrpay = "Tranfers to abroad"; 250 251 proc contents; 252 253 run; 254 %mend; 255 %one(99); NOTE: There were 13801 observations read from the data set ZH.NEW99. NOTE: The data set ZH.DATA99 has 13801 observations and 512 variables. NOTE: DATA statement used (Total process time): real time 7.25 seconds cpu time 2.11 seconds NOTE: There were 13801 observations read from the data set ZH.DATA99. NOTE: The data set ZH.EARNER99 has 22938 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 2.55 seconds cpu time 0.65 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.23 seconds cpu time 0.08 seconds NOTE: The PROCEDURE CONTENTS printed pages 1-3. 256 %one(00); NOTE: There were 13801 observations read from the data set ZH.NEW00. NOTE: The data set ZH.DATA00 has 13801 observations and 512 variables. NOTE: DATA statement used (Total process time): real time 8.98 seconds cpu time 1.91 seconds 7 The SAS System 23:52 Sunday, May 14, 2006 NOTE: There were 13801 observations read from the data set ZH.DATA00. NOTE: The data set ZH.EARNER00 has 22779 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 2.09 seconds cpu time 0.63 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.04 seconds cpu time 0.02 seconds NOTE: The PROCEDURE CONTENTS printed pages 4-6. 257 %one(01); NOTE: There were 13601 observations read from the data set ZH.NEW01. NOTE: The data set ZH.DATA01 has 13601 observations and 512 variables. NOTE: DATA statement used (Total process time): real time 8.68 seconds cpu time 1.75 seconds NOTE: There were 13601 observations read from the data set ZH.DATA01. NOTE: The data set ZH.EARNER01 has 22153 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 2.03 seconds cpu time 0.60 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.04 seconds cpu time 0.02 seconds NOTE: The PROCEDURE CONTENTS printed pages 7-9. 258 %one(02); NOTE: There were 13681 observations read from the data set ZH.NEW02. NOTE: The data set ZH.DATA02 has 13681 observations and 512 variables. NOTE: DATA statement used (Total process time): real time 9.70 seconds cpu time 1.59 seconds NOTE: There were 13681 observations read from the data set ZH.DATA02. NOTE: The data set ZH.EARNER02 has 22361 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 2.07 seconds cpu time 0.71 seconds 8 The SAS System 23:52 Sunday, May 14, 2006 NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.04 seconds cpu time 0.01 seconds NOTE: The PROCEDURE CONTENTS printed pages 10-12. 259 %one(03); NOTE: There were 13681 observations read from the data set ZH.NEW03. NOTE: The data set ZH.DATA03 has 13681 observations and 512 variables. NOTE: DATA statement used (Total process time): real time 8.37 seconds cpu time 1.78 seconds NOTE: There were 13681 observations read from the data set ZH.DATA03. NOTE: The data set ZH.EARNER03 has 22276 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 2.05 seconds cpu time 0.72 seconds NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.06 seconds cpu time 0.02 seconds NOTE: The PROCEDURE CONTENTS printed pages 13-15. 260 261 %include '~/nta/savastata.mac'; 2716 2717 %macro convert(aa); 2718 data earner&aa; 2719 set zh.earner&aa; 2720 %savastata(~/taiwan/fies/fiesdata 2720 ! /,replace); 2721 run; 2722 %mend; 2723 %convert(99); NOTE: There were 22938 observations read from the data set ZH.EARNER99. NOTE: The data set WORK.EARNER99 has 22938 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 0.86 seconds cpu time 0.26 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/earner99.dta. * Stata reports that the dataset has 22938 observations and 71 variables. * NOTE: Savastata took less than a minute to run. * 9 The SAS System 23:52 Sunday, May 14, 2006 2955 %convert(00); NOTE: There were 22779 observations read from the data set ZH.EARNER00. NOTE: The data set WORK.EARNER00 has 22779 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 0.88 seconds cpu time 0.21 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/earner00.dta. * Stata reports that the dataset has 22779 observations and 71 variables. * NOTE: Savastata took less than a minute to run. * 3187 %convert(01); NOTE: There were 22153 observations read from the data set ZH.EARNER01. NOTE: The data set WORK.EARNER01 has 22153 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 0.84 seconds cpu time 0.18 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/earner01.dta. * Stata reports that the dataset has 22153 observations and 71 variables. * NOTE: Savastata took less than a minute to run. * 3419 %convert(02); NOTE: There were 22361 observations read from the data set ZH.EARNER02. NOTE: The data set WORK.EARNER02 has 22361 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 0.85 seconds cpu time 0.20 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/earner02.dta. * Stata reports that the dataset has 22361 observations and 71 variables. * NOTE: Savastata took less than a minute to run. * 3651 %convert(03); NOTE: There were 22276 observations read from the data set ZH.EARNER03. NOTE: The data set WORK.EARNER03 has 22276 observations and 71 variables. NOTE: DATA statement used (Total process time): real time 0.86 seconds 10 The SAS System 23:52 Sunday, May 14, 2006 cpu time 0.24 seconds NOTE: Savastata has successfully saved the * Stata 8 Intercooled data file /home/brass/hdir0/ebenstei/taiwan/fies/fiesdata/earner03.dta. * Stata reports that the dataset has 22276 observations and 71 variables. * NOTE: Savastata took less than a minute to run. * NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1:45.89 cpu time 30.06 seconds