------------------------------------------------------------------------------------------------------------ log: c:\Klaus\apec64\spring_07\stata\logs\ps5klaus.log log type: text opened on: 6 Apr 2007, 10:43:46 . use c:\Klaus\apec64\spring_07\stata\data\ps5data; . /*****************************************************************************/ > /* TASK 1: sample statistics*/ > /*****************************************************************************/ > > tab num_out; num_out | Freq. Percent Cum. ------------+----------------------------------- 0 | 100 15.58 15.58 1 | 64 9.97 25.55 2 | 90 14.02 39.56 3 | 65 10.12 49.69 4 | 54 8.41 58.10 5 | 57 8.88 66.98 6 | 34 5.30 72.27 7 | 30 4.67 76.95 8 | 34 5.30 82.24 9 | 24 3.74 85.98 10 | 13 2.02 88.01 11 | 11 1.71 89.72 12 | 10 1.56 91.28 13 | 12 1.87 93.15 14 | 4 0.62 93.77 15 | 3 0.47 94.24 16 | 7 1.09 95.33 18 | 5 0.78 96.11 19 | 4 0.62 96.73 20 | 2 0.31 97.04 21 | 2 0.31 97.35 22 | 5 0.78 98.13 23 | 3 0.47 98.60 25 | 2 0.31 98.91 26 | 1 0.16 99.07 27 | 1 0.16 99.22 31 | 2 0.31 99.53 32 | 1 0.16 99.69 104 | 1 0.16 99.84 202 | 1 0.16 100.00 ------------+----------------------------------- Total | 642 100.00 . sum out_past,det; OUT_PAST ------------------------------------------------------------- Percentiles Smallest 1% 0 0 5% 0 0 10% 0 0 Obs 642 25% .1998 0 Sum of Wgt. 642 50% 3.74975 Mean 11.2227 Largest Std. Dev. 20.46841 75% 12.3996 113.4995 90% 30.0999 134 Variance 418.9559 95% 51.0999 156.1665 Skewness 3.88361 99% 90.1332 208 Kurtosis 25.30104 . tab business; BUSINESS | Freq. Percent Cum. ------------+----------------------------------- 0 | 557 86.76 86.76 1 | 85 13.24 100.00 ------------+----------------------------------- Total | 642 100.00 . tab secfue_h; SECFUE_H | Freq. Percent Cum. ------------+----------------------------------- 0 | 316 49.22 49.22 1 | 326 50.78 100.00 ------------+----------------------------------- Total | 642 100.00 . /*****************************************************************************/ > /* TASK 2: get frequency table for bid acceptance for non-parametric analysis*/ > /*****************************************************************************/ > > tab bid choice; | CHOICE BID | 0 1 | Total -----------+----------------------+---------- 1 | 34 35 | 69 2.5 | 28 27 | 55 5 | 39 29 | 68 10 | 40 19 | 59 15 | 37 22 | 59 20 | 42 23 | 65 25 | 55 15 | 70 30 | 55 10 | 65 40 | 60 9 | 69 50 | 56 7 | 63 -----------+----------------------+---------- Total | 446 196 | 642 . /*****************************************************************************/ > /* TASK 3: Run probit models based on Cameron's framework & generate WTP predictions */ > /*****************************************************************************/ > > /*Absolute WTP */ > /***************/ > /* predictions */ > probit choice bid out_past num_out secfue_h business medical over64 hh_size inc000; Iteration 0: log likelihood = -395.01297 Iteration 1: log likelihood = -339.78228 Iteration 2: log likelihood = -338.32583 Iteration 3: log likelihood = -338.32114 Iteration 4: log likelihood = -338.32114 Probit regression Number of obs = 642 LR chi2(9) = 113.38 Prob > chi2 = 0.0000 Log likelihood = -338.32114 Pseudo R2 = 0.1435 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bid | -.0293399 .00395 -7.43 0.000 -.0370818 -.0215979 out_past | .0051472 .0032724 1.57 0.116 -.0012666 .0115611 num_out | -.0064209 .0075991 -0.84 0.398 -.0213149 .0084732 secfue_h | .2518528 .1144229 2.20 0.028 .0275881 .4761175 business | .2169744 .1597607 1.36 0.174 -.0961508 .5300997 medical | .054416 .356032 0.15 0.879 -.6433939 .7522259 over64 | -.0685801 .0863822 -0.79 0.427 -.2378861 .1007258 hh_size | -.0319732 .0376669 -0.85 0.396 -.1057991 .0418526 inc000 | .0136004 .0021572 6.30 0.000 .0093723 .0178284 _cons | -.8112058 .1987606 -4.08 0.000 -1.200769 -.4216422 ------------------------------------------------------------------------------ . gen wtp1=(-1/_b[bid])* > (_b[_cons]+_b[out_past]*out_past+_b[num_out]*num_out+_b[secfue_h]*secfue_h+_b[business]*business+_b[medica > l]*medical+_b[over64]*over64+_b[hh_size]*hh_size+_b[inc000]*inc000); . sum wtp1,det; wtp1 ------------------------------------------------------------- Percentiles Smallest 1% -27.32226 -33.99849 5% -21.28354 -32.97885 10% -18.28235 -30.54993 Obs 642 25% -10.83206 -27.62248 Sum of Wgt. 642 50% -2.121402 Mean -.5863564 Largest Std. Dev. 14.05737 75% 9.250245 32.59522 90% 18.71337 33.59536 Variance 197.6096 95% 24.2018 37.76604 Skewness .311085 99% 32.0015 38.06942 Kurtosis 2.480093 . sum wtp1 if wtp1<0; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- wtp1 | 360 -10.85325 7.199342 -33.99849 -.1081481 . /* 3 cases */ > sum wtp1 if wtp1>0; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- wtp1 | 282 12.52032 8.781637 .2329847 38.06942 . /* marginal effects */ > dprobit choice bid out_past num_out secfue_h business medical over64 hh_size inc000; Iteration 0: log likelihood = -395.01297 Iteration 1: log likelihood = -339.78228 Iteration 2: log likelihood = -338.32583 Iteration 3: log likelihood = -338.32114 Iteration 4: log likelihood = -338.32114 Probit regression, reporting marginal effects Number of obs = 642 LR chi2(9) = 113.38 Prob > chi2 = 0.0000 Log likelihood = -338.32114 Pseudo R2 = 0.1435 ------------------------------------------------------------------------------ choice | dF/dx Std. Err. z P>|z| x-bar [ 95% C.I. ] ---------+-------------------------------------------------------------------- bid | -.0097286 .0012733 -7.43 0.000 20.1425 -.012224 -.007233 out_past | .0017067 .0010856 1.57 0.116 11.2227 -.000421 .003834 num_out | -.002129 .0025187 -0.84 0.398 5.4704 -.007066 .002808 secfue_h*| .0832718 .0376176 2.20 0.028 .507788 .009543 .157001 business*| .0751745 .057467 1.36 0.174 .132399 -.037459 .187808 medical*| .0183217 .1216631 0.15 0.879 .024922 -.220134 .256777 over64 | -.0227399 .028647 -0.79 0.427 .358255 -.078887 .033407 hh_size | -.0106017 .0124952 -0.85 0.396 2.66044 -.035092 .013888 inc000 | .0045096 .0007081 6.30 0.000 53.162 .003122 .005898 ---------+-------------------------------------------------------------------- obs. P | .305296 pred. P | .2715332 (at x-bar) ------------------------------------------------------------------------------ (*) dF/dx is for discrete change of dummy variable from 0 to 1 z and P>|z| correspond to the test of the underlying coefficient being 0 . /*Log WTP */ > /***************/ > gen lnbid =log(bid); . /* predictions */ > probit choice lnbid out_past num_out secfue_h business medical over64 hh_size inc000; Iteration 0: log likelihood = -395.01297 Iteration 1: log likelihood = -341.91009 Iteration 2: log likelihood = -341.14163 Iteration 3: log likelihood = -341.1408 Probit regression Number of obs = 642 LR chi2(9) = 107.74 Prob > chi2 = 0.0000 Log likelihood = -341.1408 Pseudo R2 = 0.1364 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnbid | -.3312535 .045277 -7.32 0.000 -.4199949 -.2425121 out_past | .0061968 .0032201 1.92 0.054 -.0001145 .0125081 num_out | -.0084248 .0073288 -1.15 0.250 -.0227889 .0059394 secfue_h | .2722326 .1138957 2.39 0.017 .0490012 .495464 business | .2045926 .1587219 1.29 0.197 -.1064965 .5156818 medical | .0393294 .3578518 0.11 0.912 -.6620472 .740706 over64 | -.083157 .086218 -0.96 0.335 -.2521413 .0858272 hh_size | -.0383191 .0377187 -1.02 0.310 -.1122464 .0356083 inc000 | .0135657 .002145 6.32 0.000 .0093616 .0177698 _cons | -.5439454 .2144112 -2.54 0.011 -.9641836 -.1237071 ------------------------------------------------------------------------------ . scalar sig=(-1/_b[lnbid]); . /* estimated error standard deviation */ > scalar list sig; sig = 3.0188358 . gen lnwtp=(-1/_b[lnbid])* > (_b[_cons]+_b[out_past]*out_past+_b[num_out]*num_out+_b[secfue_h]*secfue_h+_b[business]*business+_b[medica > l]*medical+_b[over64]*over64+_b[hh_size]*hh_size+_b[inc000]*inc000); . gen wtp2=exp(lnwtp+0.5*sig^2); . sum wtp2,det; wtp2 ------------------------------------------------------------- Percentiles Smallest 1% 17.42207 5.644463 5% 30.15658 9.615144 10% 41.17213 12.29927 Obs 642 25% 79.41759 16.55036 Sum of Wgt. 642 50% 166.0794 Mean 445.0177 Largest Std. Dev. 745.9149 75% 483.4754 4099.707 90% 1158.814 4161.55 Variance 556389 95% 1785.833 6138.116 Skewness 4.287017 99% 3680.063 8174.938 Kurtosis 30.56834 . gen wtp3= exp(lnwtp); . sum wtp3,det; wtp3 ------------------------------------------------------------- Percentiles Smallest 1% .182876 .0592488 5% .3165476 .1009282 10% .4321756 .129103 Obs 642 25% .8336306 .1737258 Sum of Wgt. 642 50% 1.743302 Mean 4.671262 Largest Std. Dev. 7.82972 75% 5.074945 43.03381 90% 12.16383 43.68296 Variance 61.30451 95% 18.74553 64.43058 Skewness 4.287017 99% 38.62888 85.8107 Kurtosis 30.56834 . /*****************************************************************************/ > /* TASK 4: Household-specific predictions*/ > /*****************************************************************************/ > quietly probit choice lnbid out_past num_out secfue_h business medical over64 hh_size inc000; . nlcom exp((-1/_b[lnbid])* > (_b[_cons]+_b[out_past]*10+_b[num_out]*6+_b[secfue_h]*0+_b[business]*1+_b[medical]*1+_b[over64]*2+_b[hh_si > ze]*4+_b[inc000]*80)); _nl_1: exp((-1/_b[lnbid])* (_b[_cons]+_b[out_past]*10+_b[num_out]*6+_b[secfue_h]*0+_b[business]*1+_b > [medical]*1+_b[over64]*2+_b[hh_size]*4+_b[inc000]*80)) ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _nl_1 | 4.221411 5.169258 0.82 0.414 -5.910148 14.35297 ------------------------------------------------------------------------------ . /*****************************************************************************/ > /* TASK 5: Logit model */ > /*****************************************************************************/ > > logit choice bid out_past num_out secfue_h business medical over64 hh_size inc000; Iteration 0: log likelihood = -395.01297 Iteration 1: log likelihood = -340.74005 Iteration 2: log likelihood = -337.77688 Iteration 3: log likelihood = -337.72923 Iteration 4: log likelihood = -337.72921 Logistic regression Number of obs = 642 LR chi2(9) = 114.57 Prob > chi2 = 0.0000 Log likelihood = -337.72921 Pseudo R2 = 0.1450 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bid | -.0514673 .0071551 -7.19 0.000 -.0654911 -.0374434 out_past | .0088086 .0053969 1.63 0.103 -.0017691 .0193863 num_out | -.0100618 .0124485 -0.81 0.419 -.0344605 .0143368 secfue_h | .4514387 .1949566 2.32 0.021 .0693308 .8335465 business | .3565386 .2677108 1.33 0.183 -.168165 .8812422 medical | .1272559 .5779237 0.22 0.826 -1.005454 1.259966 over64 | -.1504908 .1510266 -1.00 0.319 -.4464974 .1455159 hh_size | -.06008 .0657654 -0.91 0.361 -.1889778 .0688178 inc000 | .0231899 .0037226 6.23 0.000 .0158937 .030486 _cons | -1.334488 .3403479 -3.92 0.000 -2.001558 -.6674186 ------------------------------------------------------------------------------ . gen wtp1_l=(-1/_b[bid])* > (_b[_cons]+_b[out_past]*out_past+_b[num_out]*num_out+_b[secfue_h]*secfue_h+_b[business]*business+_b[medica > l]*medical+_b[over64]*over64+_b[hh_size]*hh_size+_b[inc000]*inc000); . sum wtp1_l,det; wtp1_l ------------------------------------------------------------- Percentiles Smallest 1% -26.09251 -32.51855 5% -20.83446 -30.19959 10% -16.85638 -28.81703 Obs 642 25% -9.808592 -26.68183 Sum of Wgt. 642 50% -1.473745 Mean .1554994 Largest Std. Dev. 13.80293 75% 10.27625 32.4711 90% 19.29577 33.66012 Variance 190.521 95% 24.75739 37.74629 Skewness .2980515 99% 32.27863 38.11068 Kurtosis 2.485912 . logit choice lnbid out_past num_out secfue_h business medical over64 hh_size inc000; Iteration 0: log likelihood = -395.01297 Iteration 1: log likelihood = -342.84329 Iteration 2: log likelihood = -341.24469 Iteration 3: log likelihood = -341.23538 Iteration 4: log likelihood = -341.23538 Logistic regression Number of obs = 642 LR chi2(9) = 107.56 Prob > chi2 = 0.0000 Log likelihood = -341.23538 Pseudo R2 = 0.1361 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnbid | -.5546132 .0773067 -7.17 0.000 -.7061315 -.4030949 out_past | .0104379 .0053033 1.97 0.049 .0000436 .0208322 num_out | -.0134188 .0120203 -1.12 0.264 -.0369782 .0101405 secfue_h | .4780444 .194145 2.46 0.014 .0975272 .8585615 business | .3462363 .2651904 1.31 0.192 -.1735272 .8659999 medical | .0907462 .5802217 0.16 0.876 -1.046467 1.22796 over64 | -.1746546 .1512191 -1.15 0.248 -.4710386 .1217294 hh_size | -.0701328 .0663487 -1.06 0.290 -.2001738 .0599082 inc000 | .0229807 .0036925 6.22 0.000 .0157436 .0302178 _cons | -.9059821 .3638661 -2.49 0.013 -1.619147 -.1928175 ------------------------------------------------------------------------------ . gen lnwtp_l=(-1/_b[lnbid])* > (_b[_cons]+_b[out_past]*out_past+_b[num_out]*num_out+_b[secfue_h]*secfue_h+_b[business]*business+_b[medica > l]*medical+_b[over64]*over64+_b[hh_size]*hh_size+_b[inc000]*inc000); . gen wtp2_l=exp(lnwtp_l+0.5*sig^2); . sum wtp2_l,det; wtp2_l ------------------------------------------------------------- Percentiles Smallest 1% 16.68641 7.281664 5% 27.56954 8.477492 10% 40.5827 10.79076 Obs 642 25% 76.42077 14.59454 Sum of Wgt. 642 50% 167.8507 Mean 466.9749 Largest Std. Dev. 803.6647 75% 498.6596 4438.566 90% 1180.186 4566.361 Variance 645876.9 95% 1940.521 6939.333 Skewness 4.371557 99% 3968.263 8710.679 Kurtosis 31.25048 . gen wtp3_l= exp(lnwtp_l); . sum wtp3_l,det; wtp3_l ------------------------------------------------------------- Percentiles Smallest 1% .1751539 .0764342 5% .289392 .0889866 10% .4259886 .1132685 Obs 642 25% .8021736 .153196 Sum of Wgt. 642 50% 1.761895 Mean 4.901743 Largest Std. Dev. 8.435908 75% 5.23433 46.59074 90% 12.38817 47.93219 Variance 71.16454 95% 20.36926 72.8408 Skewness 4.371557 99% 41.65406 91.43426 Kurtosis 31.25048 . log close; log: c:\Klaus\apec64\spring_07\stata\logs\ps5klaus.log log type: text closed on: 6 Apr 2007, 10:43:46 ------------------------------------------------------------------------------------------------------------