Dear all,
I tried to illustrate the proportion of yes answer for different bid levels from a contingent valuation survey. The version is Stata 15.1.
The summary statistics below provides the proportion of yes answers for 4 different bid levels. The graph (provided below) based on .sts graph at a first glance seems correct. However, a closer look reveals that the proportions are not correct, i.e. at bid=50 the proportion should be 0.96, at bid=100 it should be 0.749 and not above 0.75 as it is now, at bid=150 it is hard to distinguish whether the proportion is the correct 0.541, but at bid=200 it is obvious that the proportion yes answer is higher than the correct 0.304.
I tried to trick Stata by adding bid=0 with proportion yes = 1, i.e. no one says not to the bid (price) equal to zero. Same result. I would be very grateful for any help on, either what is wrong with my code, or for an alternative to illustrate my survival curve with the right proportions.

Thank you in advance,
Henrik
I tried to illustrate the proportion of yes answer for different bid levels from a contingent valuation survey. The version is Stata 15.1.
The summary statistics below provides the proportion of yes answers for 4 different bid levels. The graph (provided below) based on .sts graph at a first glance seems correct. However, a closer look reveals that the proportions are not correct, i.e. at bid=50 the proportion should be 0.96, at bid=100 it should be 0.749 and not above 0.75 as it is now, at bid=150 it is hard to distinguish whether the proportion is the correct 0.541, but at bid=200 it is obvious that the proportion yes answer is higher than the correct 0.304.
I tried to trick Stata by adding bid=0 with proportion yes = 1, i.e. no one says not to the bid (price) equal to zero. Same result. I would be very grateful for any help on, either what is wrong with my code, or for an alternative to illustrate my survival curve with the right proportions.
Code:
. su yes if bid==50 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- yes | 375 .96 .196221 0 1 . su yes if bid==100 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- yes | 375 .7493333 .4339759 0 1 . su yes if bid==150 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- yes | 375 .5413333 .4989543 0 1 . su yes if bid==200 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- yes | 375 .304 .4605971 0 1 . . stset bid, failure(yes) failure event: yes != 0 & yes < . obs. time interval: (0, bid] exit on or before: failure ------------------------------------------------------------------------------ 1,875 total observations 375 observations end on or before enter() ------------------------------------------------------------------------------ 1,500 observations remaining, representing 958 failures in single-record/single-failure data 187,500 total analysis time at risk and under observation at risk from t = 0 earliest observed entry t = 0 last observed exit t = 200 . sts graph failure _d: yes analysis time _t: bid
Thank you in advance,
Henrik
Comment