Announcement

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

  • Computing Average Treatment Effect for the Untreated (ATU) from IPTW-RA

    I am using the doubly robust estimator IPTW-RA to estimate the average treatment effect parameters (ATE, ATET and ATU). However, after computing the first two (i.e., ATE and ATET), I do not seem to find my way on how to compute the average treatment effect for the untreated (i.e., ATU). I will highly appreciate if someone help me out on how I can compute the ATU using the IPTW-RA estimator.

    Thank you in advance

  • #2
    The ATU is simply the ATET on the untreated group. So just estimate this.

    Code:
    webuse cattaneo2, clear
    *ATET (Smokers treated group)
    teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet
    *ATU (Nonsmokers treated group)
    gen mbnosmoke= !mbsmoke
    lab def mbnosmoke 1 "nonsmoker" 0 "smoker"
    lab values mbnosmoke mbnosmoke
    teffects ipwra (bweight) (mbnosmoke mmarried c.mage##c.mage fbaby medu, probit), atet
    Res.:

    Code:
    . *ATET (Smokers treated group)
    
    .
    . teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet
    
    Iteration 0:   EE criterion =  5.158e-21  
    Iteration 1:   EE criterion =  4.317e-27  
    
    Treatment-effects estimation                    Number of obs     =      4,642
    Estimator      : IPW regression adjustment
    Outcome model  : linear
    Treatment model: probit
    ----------------------------------------------------------------------------------------
                           |               Robust
                   bweight |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------------+----------------------------------------------------------------
    ATET                   |
                   mbsmoke |
    (smoker vs nonsmoker)  |  -225.1773   23.66458    -9.52   0.000     -271.559   -178.7955
    -----------------------+----------------------------------------------------------------
    POmean                 |
                   mbsmoke |
                nonsmoker  |   3362.837   14.20149   236.79   0.000     3335.003    3390.671
    ----------------------------------------------------------------------------------------
    
    .
    . *ATU (Nonsmokers treated group)
    
    .
    . gen mbnosmoke= !mbsmoke
    
    .
    . lab def mbnosmoke 1 "nonsmoker" 0 "smoker"
    
    .
    . lab values mbnosmoke mbnosmoke
    
    .
    . teffects ipwra (bweight) (mbnosmoke mmarried c.mage##c.mage fbaby medu, probit), atet
    
    Iteration 0:   EE criterion =  4.648e-21  
    Iteration 1:   EE criterion =  1.111e-25  
    
    Treatment-effects estimation                    Number of obs     =      4,642
    Estimator      : IPW regression adjustment
    Outcome model  : linear
    Treatment model: probit
    ----------------------------------------------------------------------------------------
                           |               Robust
                   bweight |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -----------------------+----------------------------------------------------------------
    ATET                   |
                 mbnosmoke |
    (nonsmoker vs smoker)  |   231.8782   27.69714     8.37   0.000     177.5928    286.1636
    -----------------------+----------------------------------------------------------------
    POmean                 |
                 mbnosmoke |
                   smoker  |   3181.033   26.11801   121.79   0.000     3129.843    3232.224
    ----------------------------------------------------------------------------------------
    
    .

    Comment


    • #3
      Thank you very much Prof. Your code has worked perfectly as always. I really appreciate your kind helps.

      Comment


      • #4
        Also note that the most straightforward way to achieve #2 is to specify the -tlevel()- option.


        tlevel(# | label) specifies the level of tvar that is the treatment for the statistic atet. The default is the second treatment level. You may specify the numeric level # (a nonnegative integer) or the label associated with the numeric level. tlevel() may only be specified with statistic atet. tlevel() and control() may not specify the same treatment level.

        Code:
        webuse cattaneo2, clear
        *ATET (Smokers treated group)
        teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet
        *ATU (Nonsmokers treated group)
        teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet tlevel(0)
        Res.:

        Code:
        . *ATET (Smokers treated group)
        
        .
        . teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet
        
        Iteration 0:   EE criterion =  5.158e-21  
        Iteration 1:   EE criterion =  4.317e-27  
        
        Treatment-effects estimation                    Number of obs     =      4,642
        Estimator      : IPW regression adjustment
        Outcome model  : linear
        Treatment model: probit
        ----------------------------------------------------------------------------------------
                               |               Robust
                       bweight |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -----------------------+----------------------------------------------------------------
        ATET                   |
                       mbsmoke |
        (smoker vs nonsmoker)  |  -225.1773   23.66458    -9.52   0.000     -271.559   -178.7955
        -----------------------+----------------------------------------------------------------
        POmean                 |
                       mbsmoke |
                    nonsmoker  |   3362.837   14.20149   236.79   0.000     3335.003    3390.671
        ----------------------------------------------------------------------------------------
        
        .
        . *ATU (Nonsmokers treated group)
        
        .
        . teffects ipwra (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit), atet tlevel(0)
        
        Iteration 0:   EE criterion =  4.648e-21  
        Iteration 1:   EE criterion =  1.111e-25  
        
        Treatment-effects estimation                    Number of obs     =      4,642
        Estimator      : IPW regression adjustment
        Outcome model  : linear
        Treatment model: probit
        ----------------------------------------------------------------------------------------
                               |               Robust
                       bweight |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -----------------------+----------------------------------------------------------------
        ATET                   |
                       mbsmoke |
        (nonsmoker vs smoker)  |   231.8782   27.69714     8.37   0.000     177.5928    286.1636
        -----------------------+----------------------------------------------------------------
        POmean                 |
                       mbsmoke |
                       smoker  |   3181.033   26.11801   121.79   0.000     3129.843    3232.224
        ----------------------------------------------------------------------------------------
        
        .

        Comment


        • #5
          Thanks Prof. for the additional information. Meanwhile is there a way I can use esttab or estout command to save mlogit regression restults for all levels except the base outcome into latex? Additional help on this will be much much appreciated.

          Thank you.

          Comment


          • #6
            See https://www.statalist.org/forums/for...-esttab-comand. Start a new thread if you have follow up questions as this topic does not relate to the title of the thread.

            Comment


            • #7
              Well noted Prof. and thanks for the help. I appreciate it.

              Comment


              • #8
                Thank you Prof. I was also struggling with getting ATU under IPWRA.

                Assume that you want to compute ATU of smokers of different substances e.g. Shsha, Tobacco, Cocaine, Khat ...

                How do you go about this?

                Thank you

                Comment


                • #9
                  Originally posted by Francis Onyango View Post
                  Assume that you want to compute ATU of smokers of different substances e.g. Shsha, Tobacco, Cocaine, Khat ...

                  How do you go about this?
                  Create separate indicators for each of these substances (=1 if an individual is a user and 0 otherwise). Then proceed the same as the example in #4. Look at how the variable "mbsmoke" is defined below.

                  Code:
                  webuse cattaneo2, clear
                  tab mbsmoke
                  browse bweight mbsmoke, nolab

                  Comment


                  • #10
                    This is a study of impact of CSA1 on Prof in two Regions (1 = Kisii, 0 = Uasin Gishu). The CSA1 are coded as follows: 1=F0V0C0, 2=F1V0C0, 3=F0V0C1, 4=F1V0C1, 5=F0V1C1, 6 =F1V1C1.

                    Gender is coded as: 1=Male , 0=Female

                    The following equation below gives ATET when F0V0C0 is the reference category.

                    teffects ipwra ( Prof Farmsize Gender Dsyst Coop) ( CSA1 County2 Rainl Temp EWS), atet

                    How can I get ATU of the same equation?


                    ----------------------- copy starting from the next line -----------------------
                    Code:
                    teffects ipwra ( Prof Farmsize Gender Dsyst Coop)   ( CSA1 County2 Rainl Temp EWS), atet
                    
                    * Example generated by -dataex-. To install: ssc install dataex
                    clear
                    input double(Prof Farmsize) byte(Gender Dsyst Coop) str6 CSA1 str12 County2 byte(Rainl Temp EWS)
                    .06  10 1 1 1 "F1V0C0" "Uasin Gishu " 5 2 1
                    .43   1 1 1 0 "F1V0C1" "Uasin Gishu " 4 3 1
                    .17  10 0 3 1 "F1V0C1" "Uasin Gishu " 6 1 1
                    .41   1 1 1 0 "F1V1C1" "Uasin Gishu " 5 2 1
                    .06 2.5 1 1 1 "F0V1C1" "Uasin Gishu " 4 3 0
                    .16   2 1 1 0 "F0V0C1" "Uasin Gishu " 5 2 1
                    .24   2 0 1 0 "F1V0C0" "Uasin Gishu " 6 3 1
                    .24   1 1 3 1 "F1V0C0" "Uasin Gishu " 4 2 0
                    .36   4 0 1 1 "F0V1C1" "Uasin Gishu " 3 3 0
                    .01   3 1 3 0 "F1V0C1" "Uasin Gishu " 4 4 1
                    .27   5 0 2 0 "F1V0C1" "Uasin Gishu " 5 3 1
                     .1   5 1 2 0 "F0V0C0" "Uasin Gishu " 4 2 1
                    .35   2 1 1 1 "F1V0C1" "Uasin Gishu " 3 3 0
                    .07  10 0 1 1 "F1V0C1" "Uasin Gishu " 4 1 0
                    .02   2 1 1 0 "F1V0C1" "Uasin Gishu " 5 2 1
                    .14   1 0 1 1 "F0V1C1" "Uasin Gishu " 5 3 1
                    .51   4 0 1 0 "F0V0C1" "Uasin Gishu " 6 4 0
                    .16   5 0 3 0 "F1V0C1" "Uasin Gishu " 7 1 0
                    .33   5 0 1 0 "F1V0C1" "Uasin Gishu " 4 2 0
                    .07  .5 1 2 1 "F1V0C1" "Uasin Gishu " 5 3 0
                    .26   5 0 1 0 "F1V0C1" "Uasin Gishu " 6 2 0
                    .32   2 1 1 1 "F0V1C1" "Uasin Gishu " 4 3 1
                    .11   6 1 1 0 "F1V0C1" "Uasin Gishu " 3 4 1
                    .33 2.5 1 1 0 "F1V0C1" "Uasin Gishu " 4 2 1
                    .04  15 1 2 1 "F1V1C1" "Uasin Gishu " 5 1 1
                    .05   2 1 1 0 "F0V1C1" "Uasin Gishu " 6 2 1
                    .02   2 1 1 1 "F0V0C1" "Uasin Gishu " 5 3 1
                    .25   2 0 1 0 "F0V0C1" "Uasin Gishu " 4 2 1
                    .33   3 1 2 0 "F1V1C1" "Uasin Gishu " 6 3 1
                    .04   1 1 1 0 "F0V0C1" "Uasin Gishu " 7 2 1
                    .25  10 0 2 1 "F0V0C1" "Uasin Gishu " 6 4 1
                    .29   5 1 1 1 "F0V1C1" "Uasin Gishu " 8 2 1
                    .35   3 1 1 0 "F0V0C1" "Uasin Gishu " 8 3 1
                    .28   5 1 2 1 "F0V0C1" "Uasin Gishu " 7 4 1
                    .12   4 1 1 0 "F0V0C1" "Uasin Gishu " 8 1 1
                    .35   7 0 2 1 "F1V1C1" "Uasin Gishu " 4 3 1
                    .16   2 0 1 0 "F0V0C1" "Kisii"        5 4 1
                    .35   4 1 1 0 "F0V1C1" "Kisii"        3 2 1
                    .08   5 0 1 1 "F0V1C1" "Kisii"        4 3 1
                    .26   6 0 1 0 "F0V0C1" "Kisii"        5 4 1
                    .29  15 1 1 1 "F0V1C1" "Kisii"        6 3 1
                    .45   3 0 1 1 "F0V1C1" "Kisii"        7 4 1
                    .08   7 1 2 0 "F0V0C1" "Kisii"        5 5 1
                     .3   4 1 1 1 "F0V0C1" "Kisii"        6 3 1
                    .07  15 1 1 1 "F0V0C1" "Kisii"        7 4 1
                    .26   4 1 1 0 "F0V0C1" "Kisii"        6 5 0
                    .11   9 1 1 1 "F0V1C1" "Kisii"        7 4 1
                    .17   2 0 1 0 "F0V0C1" "Kisii"        8 3 1
                    .08   2 1 1 0 "F0V0C1" "Kisii"        6 4 1
                     .3   5 0 3 1 "F0V1C1" "Kisii"        7 5 1
                    .17   1 1 1 0 "F0V0C1" "Kisii"        8 3 1
                    .26   6 0 2 1 "F1V1C1" "Kisii"        6 4 1
                    .09  40 1 2 0 "F0V1C1" "Kisii"        7 3 1
                    .32   5 0 2 1 "F1V1C1" "Kisii"        8 2 1
                    .18  10 0 2 1 "F1V1C1" "Kisii"        6 3 1
                    .05   4 1 1 0 "F0V0C1" "Kisii"        5 4 1
                    .28  10 1 2 1 "F1V1C1" "Kisii"        6 3 1
                    .07  10 0 2 1 "F0V0C1" "Kisii"        5 4 0
                    .05   4 1 2 1 "F0V0C1" "Kisii"        6 5 1
                    .13  13 1 1 0 "F1V0C1" "Kisii"        7 4 1
                    end
                    ------------------ copy up to and including the previous line ------------------

                    Comment


                    • #11
                      CSA1 as you describe is a categorical variable, but below you have a linear model and therefore are treating it as continuous.

                      teffects ipwra ( Prof Farmsize Gender Dsyst Coop) ( CSA1 County2 Rainl Temp EWS), atet
                      As I said, create indicators from this variable and have a probit model for your second equation. Then calculate ATU (ATET on the untreated group) as I do in #4.

                      Comment


                      • #12
                        One comment on #4: That actually computes the IPW estimates, not IPWRA, because no covariates are included in (bweight). The command in #10 is weird in that controls in the mean and propensity score functions are completely different. If you want to do IPWRA, I recommend the same controls in the mean and PS functions.

                        Also, Felix referred to "IPTW-RA." Does this mean the tilting estimators of the propensity score? If so, Stata does not yet support that option. Only MLE is used to estimate the treatment model.

                        Comment


                        • #13
                          Thank you Jeff for your insight.

                          Is it that teffects ipwra ( Prof Farmsize Gender Dsyst Coop) ( CSA1 County2 Rainl Temp EWS), atet

                          Is read as teffects ipwra ( mean) ( propensity score), atet?

                          Code:
                           teffects ipwra ( Prof Farmsize Gender Dsyst Coop) ( CSA1 County2 Rainl Temp EWS), atet
                          
                          
                          Iteration 0:   EE criterion =  2.091e-14  
                          Iteration 1:   EE criterion =  8.504e-25  
                          
                          Treatment-effects estimation                    Number of obs      =       447
                          Estimator      : IPW regression adjustment
                          Outcome model  : linear
                          Treatment model: (multinomial) logit
                          -------------------------------------------------------------------------------------
                                              |               Robust
                                Profitability |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                          --------------------+----------------------------------------------------------------
                          ATET                |
                                         CSA1 |
                          (F1V0C0 vs F0V0C0)  |   .2007783   .0686724     2.92   0.003     .0661829    .3353737
                          (F0V0C1 vs F0V0C0)  |   .0904813   .0502033     1.80   0.071    -.0079153    .1888779
                          (F1V0C1 vs F0V0C0)  |   .1985047   .0585977     3.39   0.001     .0836552    .3133541
                          (F0V1C1 vs F0V0C0)  |   .4804841    .070027     6.86   0.000     .3432337    .6177345
                          (F1V1C1 vs F0V0C0)  |   .2799776   .0479458     5.84   0.000     .1860057    .3739496
                          --------------------+----------------------------------------------------------------
                          POmean              |
                                         CSA1 |
                                      F0V0C0  |   .1236164   .0394748     3.13   0.002     .0462472    .2009856
                          -------------------------------------------------------------------------------------
                          
                          
                          * Example generated by -dataex-. To install: ssc install dataex
                          clear
                          input double(Profitability Farmsize) byte(DairyDecisionmaker DairySystm CoopMember) float CSA1 long County2 double(LnRainfall LnTempMax) byte ReceiveEW
                          
                          end
                          label values CSA1 CSA1
                          label def CSA1 2 "F1V0C0", modify
                          label def CSA1 4 "F1V0C1", modify
                          label values County2 County2
                          label def County2 2 "Uasin Gishu", modify

                          Comment


                          • #14
                            Kindly ignore what is below the table.

                            This is what I get. Does it mean that the results are worthless? Kindly assist.

                            Thank you

                            Comment


                            • #15
                              I have always read the equation as follows:

                              teffects ipwra ( outcome equation ) ( selection equation), atet

                              Oooohhh!!! Poor me!!

                              Comment

                              Working...
                              X