---------------------------------------------------------------------------------------------------- log: c:\klaus\apec64\spring_07\stata\logs\tc_single.log log type: text opened on: 7 Feb 2007, 14:05:40 . use c:\klaus\apec64\spring_07\stata\data\W3trips,replace; . /* STEP 1: variable definitions and sample statistics*/ > > describe; Contains data from c:\klaus\apec64\spring_07\stata\data\W3trips.dta obs: 539 vars: 13 5 Feb 2007 12:42 size: 46,354 (99.9% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- survey_id str6 %6s original survey id fishyrs double %10.0g years of fishing experience flyfish double %10.0g flyfish 1=flyfish only gender double %10.0g gender 1=female age double %10.0g age in years income double %10.0g annual income in $ tcW3 double %10.0g round trip travel cost to W3 distW3 double %10.0g distance from ZIP code to W3, miles tripsW3 float %9.0g trips to W3 in 2004 and 2005 ln_inc float %9.0g log of income inc0000 float %9.0g income in $10,000s age2 float %9.0g age squared runid float %9.0g running id ------------------------------------------------------------------------------- Sorted by: survey_id . sum; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- survey_id | 0 fishyrs | 539 38.08163 16.25771 1 81 flyfish | 539 .5213358 .5000086 0 1 gender | 539 .1502783 .3576759 0 1 age | 539 51.84972 13.76737 18 89 -------------+-------------------------------------------------------- income | 539 82940.63 59446.43 10000 350000 tcW3 | 539 81.11525 43.46726 20.7903 371.9904 distW3 | 539 101.3941 54.33408 25.98788 464.988 tripsW3 | 539 .6141002 2.823077 0 35 ln_inc | 539 11.096 .7138172 9.21034 12.76569 -------------+-------------------------------------------------------- inc0000 | 539 8.294063 5.944643 1 35 age2 | 539 2877.583 1444.792 324 7921 runid | 539 270 155.7402 1 539 . /* STEP 2: run simple Poisson model and examine marginal effects*/ > poisson tripsW3 gender age fishyrs inc0000 tcW3; Iteration 0: log likelihood = -918.87577 Iteration 1: log likelihood = -918.35316 Iteration 2: log likelihood = -918.35201 Iteration 3: log likelihood = -918.35201 Poisson regression Number of obs = 539 LR chi2(5) = 133.94 Prob > chi2 = 0.0000 Log likelihood = -918.35201 Pseudo R2 = 0.0680 ------------------------------------------------------------------------------ tripsW3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- gender | -1.752754 .3403633 -5.15 0.000 -2.419854 -1.085654 age | -.0329609 .0070066 -4.70 0.000 -.0466936 -.0192282 fishyrs | .0217691 .0067391 3.23 0.001 .0085608 .0349775 inc0000 | .0098316 .0089804 1.09 0.274 -.0077697 .0274329 tcW3 | -.0137675 .00224 -6.15 0.000 -.0181577 -.0093772 _cons | 1.389947 .2593838 5.36 0.000 .8815645 1.89833 ------------------------------------------------------------------------------ . /* Step 3: predict trips at current situation (status quo), and examine the distribution of predic > tions */ > predict lamdahat; (option n assumed; predicted number of events) . sum lamdahat, det; predicted number of events ------------------------------------------------------------- Percentiles Smallest 1% .0282438 .0024243 5% .0661482 .0118559 10% .1017694 .0163152 Obs 539 25% .3488904 .0165212 Sum of Wgt. 539 50% .6083021 Mean .6141002 Largest Std. Dev. .3746557 75% .8151793 1.727656 90% 1.103332 1.785973 Variance .1403669 95% 1.294551 1.847364 Skewness .5780878 99% 1.712435 2.183366 Kurtosis 3.576049 . /*STEP 4: derive & summarize seasonal welfare at status quo*/ > gen cs =-(1/_b[tcW3])*lamdahat; . sum cs, det; cs ------------------------------------------------------------- Percentiles Smallest 1% 2.051486 .1760868 5% 4.80467 .8611562 10% 7.392013 1.185051 Obs 539 25% 25.34164 1.200018 Sum of Wgt. 539 50% 44.184 Mean 44.60515 Largest Std. Dev. 27.2131 75% 59.21053 125.4882 90% 80.14045 129.7241 Variance 740.553 95% 94.02967 134.1832 Skewness .5780877 99% 124.3827 158.5887 Kurtosis 3.576049 . /* "det" means show details, such as median, percentiles etc */ > gen cv =-(1/(_b[inc0000]/10000))*log(1+((_b[inc0000]/10000)/_b[tcW3])*lamdahat); . sum cv, det; cv ------------------------------------------------------------- Percentiles Smallest 1% 2.051488 .1760869 5% 4.804682 .8611565 10% 7.39204 1.185052 Obs 539 25% 25.34196 1.200018 Sum of Wgt. 539 50% 44.18496 Mean 44.60649 Largest Std. Dev. 27.21451 75% 59.21225 125.496 90% 80.14361 129.7323 Variance 740.6294 95% 94.03401 134.1921 Skewness .5781777 99% 124.3903 158.6011 Kurtosis 3.576275 . gen ev =(1/(_b[inc0000]/10000))*log(1-((_b[inc0000]/10000)/_b[tcW3])*lamdahat); . sum ev, det; ev ------------------------------------------------------------- Percentiles Smallest 1% 2.051484 .1760868 5% 4.804659 .8611558 10% 7.391986 1.18505 Obs 539 25% 25.34133 1.200017 Sum of Wgt. 539 50% 44.18304 Mean 44.6038 Largest Std. Dev. 27.2117 75% 59.2088 125.4805 90% 80.13729 129.7158 Variance 740.4766 95% 94.02532 134.1744 Skewness .5779979 99% 124.3751 158.5764 Kurtosis 3.575823 . /* ************************************************************ */ > /* Assume the policy scenario is "implement access fees of $5" */ > /* ************************************************************ */ > > /*STEP 5: Predict visits under these fees*/ > gen tc_5 = tcW3+5; . /* add $5 to everybody's travel cost */ > gen lamdahat5 = exp(_b[_cons]+ _b[gender]*gender +_b[age]*age + _b[fishyrs]*fishyrs + _b[inc0000]* > inc0000 + _b[tcW3]*tc_5); . /* note the new tc variable at the end! */ > > /* STEP 6: Compute the per-person welfare loss under the new fee */ > gen cs5 = -(1/_b[tcW3])*(lamdahat-lamdahat5); . sum cs5; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- cs5 | 539 2.967202 1.810257 .0117136 10.54956 . gen cv5 = -(1/(_b[inc0000]/10000))*log(1+((_b[inc0000]/10000)/_b[tcW3])* > (lamdahat-lamdahat5)); . sum cv5; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- cv5 | 539 2.967208 1.810263 .0117136 10.54961 . gen ev5 = (1/(_b[inc0000]/10000))*log(1-((_b[inc0000]/10000)/_b[tcW3])*(lamdahat-lamdahat5)); . sum ev5; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- ev5 | 539 2.967196 1.810251 .0117136 10.5495 . log close; log: c:\klaus\apec64\spring_07\stata\logs\tc_single.log log type: text closed on: 7 Feb 2007, 14:05:41 ----------------------------------------------------------------------------------------------------