Announcement

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

  • WTP : how to assess differences in WTP values by subgroups using a t-test?

    Hi everyone,

    I have results from a discrete choice experiment.
    My attributes are: progression-free survival (PFS) coded as 6, 12, 24 months, neruropathy in hands (mild=1,moderate=2, severe=3),neuropathy in feet (mild=1, moderate=2, severe=3), and neuropathy persistence (short-term=1, long-term=2, permanent=3). I coded all the levels continuously and want to measure the maximum acceptable risk patients are willing to tolerate in exchange for 6 months improvement in PFS (again progression free survival) using the WTP formula.

    Now, I am assessing differences by subgroup- the name of the variable is Q58_numeric and group= 1 are those without children, and group 2 are those with children. I got the WTP results per group, and I want to assess the differences between WTP values between the two groups using a t-test, but do not know how to code for it. I will show the code and result below. Can someone help me out please?


    *Run model for group 1
    foreach v in hands feet persistence {
    clogit choice PFS hands feet persistence if Q58_numeric == 1, group(resptask)
    wtp `v' PFS
    matrix `v'_1 = r(wtp)
    matrix list `v'_1
    }
    matrix append = persistence_1, hands_1, feet_1
    matrix colnames append = "Persistence" "hands" "feet"
    matrix list append


    *Run model for group 2
    foreach v in PFS hands feet persistence {
    clogit choice PFS hands feet persistence if Q58_numeric == 2, group(resptask)
    wtp `v' PFS
    matrix `v'_1 = r(wtp)
    matrix list `v'_1
    }
    matrix append = persistence_1, hands_1, feet_1
    matrix colnames append = "Persistence" "hands" "feet"
    matrix list append


    MODEL 1 RESULTS (those with children):
    Conditional logit results:

    choice | Coefficient Std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    PFS | .0568094 .0047743 11.90 0.000 .047452 .0661668
    hands | -.3651211 .0430996 -8.47 0.000 -.4495948 -.2806474
    feet | -.179239 .040492 -4.43 0.000 -.258602 -.0998761
    persistence | -.4500053 .0430675 -10.45 0.000 -.534416 -.3655945

    WTP results:
    Persistence hands feet
    wtp .12624174 .1555907 .31694796
    ll .09833833 .1156495 .17409462
    ul .15414516 .1955319 .4598013


    MODEL 2 RESULTS (those without children):
    Conditional logit results:

    ------------------------------------------------------------------------------
    choice | Coefficient Std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    PFS | .0245991 .005904 4.17 0.000 .0130275 .0361707
    hands | -.19401 .0537993 -3.61 0.000 -.2994548 -.0885653
    feet | -.0466953 .0527311 -0.89 0.376 -.1500462 .0566557
    persistence | -.3721953 .0543844 -6.84 0.000 -.4787866 -.2656039
    ------------------------------------------------------------------------------
    WTP results:
    append[3,3]
    Persistence hands feet
    wtp .06609183 .12679275 .52680012
    ll .03076077 .03796859 -.65304013
    ul .10142289 .21561691 1.7066404


  • #2
    Rotana:
    you may want to take a look at -suest-:
    Code:
    . use https://www.stata-press.com/data/r17/clogitid
    
    . clogit y x1, group(id)
    note: multiple positive outcomes within groups encountered.
    
    Iteration 0:   log likelihood = -124.50064  
    Iteration 1:   log likelihood = -124.49672  
    Iteration 2:   log likelihood = -124.49672  
    
    Conditional (fixed-effects) logistic regression         Number of obs =    369
                                                            LR chi2(1)    =   6.91
                                                            Prob > chi2   = 0.0086
    Log likelihood = -124.49672                             Pseudo R2     = 0.0270
    
    ------------------------------------------------------------------------------
               y | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
              x1 |   .7386672   .2811067     2.63   0.009     .1877082    1.289626
    ------------------------------------------------------------------------------
    
    . estimates store A
    
    . clogit y x2, group(id)
    note: multiple positive outcomes within groups encountered.
    
    Iteration 0:   log likelihood = -126.00197  
    Iteration 1:   log likelihood =   -125.992  
    Iteration 2:   log likelihood =   -125.992  
    
    Conditional (fixed-effects) logistic regression         Number of obs =    369
                                                            LR chi2(1)    =   3.92
                                                            Prob > chi2   = 0.0478
    Log likelihood = -125.992                               Pseudo R2     = 0.0153
    
    ------------------------------------------------------------------------------
               y | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
              x2 |   .0853067    .043447     1.96   0.050     .0001521    .1704613
    ------------------------------------------------------------------------------
    
    . estimates store B
    
    . suest A B
    
    Simultaneous results for A, B                              Number of obs = 369
    
                                        (Std. err. adjusted for 66 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
                 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    A_y          |
              x1 |   .7386672   .2877388     2.57   0.010     .1747095    1.302625
    -------------+----------------------------------------------------------------
    B_y          |
              x2 |   .0853067   .0454059     1.88   0.060    -.0036873    .1743006
    ------------------------------------------------------------------------------
    
    
    . test [A_y]x1=[B_y]x2
    
     ( 1)  [A_y]x1 - [B_y]x2 = 0
    
               chi2(  1) =    5.18
             Prob > chi2 =    0.0228
    
    .
    and in addition:
    Code:
    . lincom [A_y]x1-[B_y]x2
    
     ( 1)  [A_y]x1 - [B_y]x2 = 0
    
    ------------------------------------------------------------------------------
                 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             (1) |   .6533605   .2870692     2.28   0.023     .0907153    1.216006
    ------------------------------------------------------------------------------
    
    .
    Last edited by Carlo Lazzaro; 21 Sep 2023, 08:49.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your prompt response and help! I tried it and it was comparing the conditional logit model results , but not the WTP values....

      Comment


      • #4
        Rotana:
        is -ttesti- an option?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          You know what! you are right I have all the info to conduct it except for delta standard errors... I read that I would probably need to use nlcom command to have it, just don't know where to add that on my WTP code...

          Comment


          • #6
            Rotana:
            a proxy for the WTP standard error computation can be (1st mention of Persistence):
            Code:
            . di (.15414516 -.09833833)/(2*1.96)
            .01423644
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thank you so much! it worked like a charm

              Comment

              Working...
              X