Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Turnbull - returning invalid name r(198) code

    I am running a Turnbull on a Contingent Valuation Survey Response to estimate willingness to pay.

    turnbull Bid1 Response1
    1 invalid name
    r(198);


    Below are the first six rows in my data
    Bid1 Respon~1 |
    |-----------------|
    1. | 80 1 |
    2. | 20 1 |
    3. | 160 0 |
    4. | 40 0 |
    5. | 20 0 |
    |-----------------|
    6. | 160 1

    Bid1 is the bid amount, while Response1 is binary 1 or 0 (the response to the bid amount).

    I saw a thread with a similar question in the forum, and someone suggested adding 100 observations with a bid equal to 0 and a response equal to 1, which I did, but it returned some error message afterward.

    I would appreciate any suggestions on how I can solve this issue.

    local 02_Full_launch_clean_data = _N + 100

    . set obs `02_Full_launch_clean_data'
    replace Bid1 = 0 if Bid1 ==.
    replace Response1 = 1 if Response1 ==.

    | Turnbull Estimates
    Bid | Nj Tj Fj Nj* Tj* Fj* fj* Elb V(Elb) Eub
    ----------+-------------------------------------------------------------------------------------------------------------
    0p | 0.000 0.000 0.000 4.316
    20 | 71.000 329.000 0.216 71.000 329.000 0.216 0.216 0.547 0.206 1.094
    40 | 80.000 329.000 0.243 80.000 329.000 0.243 0.027 4.875 0.224 9.750
    80 | 119.000 326.000 0.365 119.000 326.000 0.365 0.122 6.676 1.138 13.353
    160 | 148.000 330.000 0.448 148.000 330.000 0.448 0.083 88.242 4.797 264.727
    480 | 1.000 1.000 0.552
    Total | 418.000 1,414.000 418.000 1,414.000 100.341 6.364 293.240
    ------------------------------------------------------------------------------------------------------------------------
    Note: (p) pooled category. Last bid value was arbitrarily chosen. Pval(Elb) = 0.00000.



    tipo not unique within _v1;
    there are multiple observations at the same tipo within _v1.
    Type "reshape error" for a listing of the problem observations.
    r(9);

Working...
X