Announcement

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

  • PSM DID with time varying covariates and treatment

    I have a panel dataset for districts over 2 years. I am trying to conduct a PSM to match the treatment and control groups on the basis of the background covariates and then apply difference in difference to eliminate the effect of the unobservables and derive the ATT. However, I have certain covariates whose values change between the baseline and endline. How can I accomodate that in the psmatch2 command to get the balanced dataset? Do I include the covariate values of the baseline period? I have matched the treatment and control groups in the base period, thus including the baseline covariate values for deriving the propensity score. Since there is no particular way to confirm the presence of parallel trends, I consider that the matched treatment and control groups in baseline will also be matched in the end period. Is this method correct?

    Also, I have some districts where the treatment status changes. How do I incorporate that?

  • #2
    Sayoree Gooptu Quite a lot to unpack here.

    Your treatment turns on and off you say? It can be treated one time, not treated the next time, and in 5 more periods be treated again?

    Comment


    • #3
      Jared Greathouse

      It may be in the control group in the first period and in the treatment group in the second. There are two periods in my data.

      The second big problem I am facing is with the values of covariates changing in the two periods. For instance, district level income. It changes between the two periods. Which value do I use to amtch the treatment and control groups?

      Comment


      • #4
        Sayoree Gooptu Okay so just so I understand you well, you're talking about the kind of treatment where once a unit is treated, it always is treated after that? That is, units can enter into being treated, but never leave being treated? I ask, because my advice will change depending on what the exact nature of the treatment is.

        Now to the next point: Covariates changing between two groups... I'm not really sure what you mean here. Can you please give a subsample of your data using the dataex command? I used some pretty advanced DD methods for my thesis, so I actually have a host of recommendations for you, if you'd like. Just share a small example with the dataex command, and I'll see what the issue is.

        Comment


        • #5
          Jared Greathouse There are districts in the control group in the base period, which are in the treatment in the end period. The reverse situation also exists where the treatment districts in the baseline are in the control group at the endline.

          Here is an example of the data

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input str4 statedist float(govgoprop dumtui logfeediff meaninc avgeduhead engdiff profdiff govprop)
          "0202"  .7461655 1 7.221122  7818.232 1.7608894   -.7135255   .03023511   .606982
          "0202"  .6855596 1 8.021608 10566.647 1.1473112   -.7135255   .03023511   .606982
          "0203"         1 0 6.570533    8562.5 1.4504764       -.925 -.010359466   .952381
          "0203"         1 0 7.558035   9623.75 1.1095276       -.925 -.010359466   .952381
          "0205"  .8473182 1 7.425683  7308.036 1.4697744 -.031026244  .021755815  .6747182
          "0205"  .7063622 1 8.085559 10489.368  1.053834 -.031026244  .021755815  .6747182
          "0206"  .7975637 1 7.365941 10198.438  1.884956  -.16829836  .002189219  .5851064
          "0206"  .6590166 1 8.175376 11943.918 1.2350892  -.16829836  .002189219  .5851064
          "0207"  .8159443 1 7.806971  11078.75 1.8326653   -.6396796   .04062676  .6867924
          "0207"   .711309 1 7.985397 13618.572  1.311845   -.6396796   .04062676  .6867924
          "0209"  .8896059 1 7.818357 9628.6875  1.122516   -.8652211   .03639567   .662069
          "0209"  .6356526 1  8.38332  12027.57 1.1183642   -.8652211   .03639567   .662069
          "0210"  .7551286 1 7.584054 9409.3125 1.0496744   -.7774265   .05216664   .762215
          "0210"  .7830901 1 8.115229  10564.48  .8096697   -.7774265   .05216664   .762215
          "0211"  .6442007 1 7.599162  9024.766 1.8849164   -.7545782  .004959285  .7195767
          "0211"  .8005522 1 8.276695 11159.894 1.1383611   -.7545782  .004959285  .7195767
          "0212"  .5692301 1 7.376543    8637.5 1.4177774   -.6954545  .011603177  .7746479
          "0212"  .4538289 1 7.883541 8642.1875  .6234731   -.6954545  .011603177  .7746479
          "0301"   .676533 1 7.438909 12130.208 1.5093312   -.4424603   .10398549     .4375
          "0301"  .7120492 1  7.72111 13841.343  1.083022   -.4424603   .10398549     .4375
          "0302"  .4390692 1 7.281219 15589.063  .9750074  -.50274074    .1166119  .3722222
          "0302"  .5178364 1 8.022742 17614.736  1.194453  -.50274074    .1166119  .3722222
          "0303"  .4382878 1 7.649951 13545.536 1.3361686    -.611111    .1659197  .4642857
          "0303"  .6084396 1 8.139675 16690.385  .9901577    -.611111    .1659197  .4642857
          "0304"  .7552137 1  7.60292   9346.25 1.7585177   -.4888585   .17981362  .5168196
          "0304"  .6871957 1 8.195732     14670 1.1621059   -.4888585   .17981362  .5168196
          "0305"  .8148354 1 7.145005     11250 1.4323404   -.4945887   .09544665   .494382
          "0305" .47484055 1 7.874595  12345.21 1.0893757   -.4945887   .09544665   .494382
          "0306"  .6550862 1 7.034709     11875   .946881   -.7105734   .13928759      .496
          "0306"  .9992834 1 8.075835 15558.984  .6471658   -.7105734   .13928759      .496
          "0307"    .57319 1 7.496208 13211.363  1.416525   -.4285368   .06922811  .5733333
          "0307"  .6160672 1 8.095861  17736.66  1.184479   -.4285368   .06922811  .5733333
          "0308"  .2192876 1 7.097592 14379.688  .8214326   -.4888889   .09177506  .9183673
          "0308"  .7211691 1 8.243631     18400  .9935877   -.4888889   .09177506  .9183673
          "0309"  .5617971 1 7.511477  13556.25 1.0113516   -.4956769   .19548893  .3344437
          "0309"  .6244313 1 7.926169 17623.623  .3735056   -.4956769   .19548893  .3344437
          "0310"  .7865826 1  7.77586 10026.563  .7679117   -.6768446   .06994778  .5272206
          "0310"  .5410968 1 8.018338 13979.785  .5808691   -.6768446   .06994778  .5272206
          "0311" .11677957 1 7.588947 12078.125  .7853182  -.52481955   .10211414  .4574133
          "0311" .07895838 1 8.071978 18814.516  .5163916  -.52481955   .10211414  .4574133
          "0312"  .6205077 1  8.19839     10555  .9184614   -.6818182   .04909086  .5479452
          "0312"  .9157663 1  7.96199 14524.747   .703912   -.6818182   .04909086  .5479452
          "0313"  .9548036 1 7.280483      8150  .6272845   -.5568869   .04695421  .5026455
          "0313"  .8379062 1  7.96258 12231.383   .767821   -.5568869   .04695421  .5026455
          "0314"  .7992797 1 7.428964     15825  1.518964   -.6161948   .07700151  .5067568
          "0314"  .6605036 1 8.159365 17284.523  .9112607   -.6161948   .07700151  .5067568
          "0315"  .8329381 1 7.427246 11118.979  1.952935   -.6187695   .10524309 .50541514
          "0315"  .5382471 1 8.107108  16598.85  .9804835   -.6187695   .10524309 .50541514
          "0316"  .5216306 1  6.96301 11835.938 2.0095372   -.4576521   .11443752   .425641
          "0316"  .8151579 1 8.474689 17501.574  .8878002   -.4576521   .11443752   .425641
          "0318"  .9582264 1 7.222714 13020.833 2.8562565  -.51321286   .09104484  .3710145
          "0318"  .6889744 1 7.982106  24081.74 1.0475717  -.51321286   .09104484  .3710145
          "0319"  .5814597 1  7.42125  14413.75  1.140836    -.542029   .10477668  .4719388
          "0319"  .7827436 1 8.257506 19062.107  .9250341    -.542029   .10477668  .4719388
          "0320"  .7101796 1 7.602614 11679.167 1.7245857   -.6769471   .08927166  .4490741
          "0320"  .9613746 1  8.02059 17241.936 1.1640835   -.6769471   .08927166  .4490741
          "0501"  .8210857 1 7.682147   8531.25 1.4672465   -.1241926   .06795126  .8343949
          "0501"  .9996588 1 7.917603 10314.063  .6340247   -.1241926   .06795126  .8343949
          "0502"  .9643146 1 7.669462  7065.625  1.993007  -.19704434   .07536435  .8923077
          "0502"  .9773127 1 8.442644  9661.458  1.717657  -.19704434   .07536435  .8923077
          "0503"  .9919428 1 7.616069  8109.375   2.23005   -.4784173   .04976958  .9328859
          "0503"  .9796541 1 8.224469    9862.5  .8671933   -.4784173   .04976958  .9328859
          "0504"  .9303669 0 7.574217  6895.833 2.0677173  -.27849042   .07131714   .908078
          "0504"  .8945987 0 7.767168  9246.875  .9669824  -.27849042   .07131714   .908078
          "0505"  .5967074 1 8.046617  11368.75 1.8555454  -.21131736    .0676769  .5019763
          "0505"  .8099985 1 8.155752 12911.493 1.9029707  -.21131736    .0676769  .5019763
          "0506"  .9941936 1 7.353178  8489.583 1.6166923    -.488234    .0299868  .8940092
          "0506"  .9206161 1 8.124716  9672.656 1.0225873    -.488234    .0299868  .8940092
          "0507"  .9272619 1 7.739269  7154.839  2.579064   -.5083177    .2175473  .8450184
          "0507"  .9030172 1 7.843869 11366.094 1.0437725   -.5083177    .2175473  .8450184
          "0508"  .9752132 1 7.387327  6834.375  .9901666   -.4012987    .0977469  .8870968
          "0508"   .856403 1 7.826324 12693.523 1.1010271   -.4012987    .0977469  .8870968
          "0509"  .9370074 1 7.628404    5912.5   .803363   -.4375989   .09149194  .8976608
          "0509"  .9592618 1 8.209888  9705.664  .8912482   -.4375989   .09149194  .8976608
          "0510"  .9214396 1 7.969238  5440.625 .30335975   -.5179832   .23016822  .8263889
          "0510"  .8736969 1 8.242318  13074.53 1.6393362   -.5179832   .23016822  .8263889
          "0511"  .7697065 1 7.385587 8229.6875 1.5928682   -.8553964   .10026795  .7306501
          "0511"  .6499828 1 7.949992 13776.904  1.471046   -.8553964   .10026795  .7306501
          "0512"  .9147649 1  7.39719   8331.25  2.108186   -.4346092    .1381045 .53521127
          "0512"  .7139851 1 7.863328 12173.088 1.0520554   -.4346092    .1381045 .53521127
          "0513"  .7584673 1 7.551225  8989.286 2.0014985   -.3964521   .12614971  .5986159
          "0513"  .6987308 1 8.101733 11984.195 1.3979658   -.3964521   .12614971  .5986159
          "0601"  .8626243 1  8.01512   21997.5 1.3558455   -.6641389   .03843141 .56589144
          "0601"   .993333 1  8.98995  19032.63 1.0866469   -.6641389   .03843141 .56589144
          "0602"   .945479 1  7.69041 11709.375   .847733  -.54900867   .10296285  .6146497
          "0602" .57724965 1  7.91606   15049.6 1.1340834  -.54900867   .10296285  .6146497
          "0603"   .552059 1 7.254658     12350 1.8744208   -.4359815    .1521021  .3982558
          "0603" .29637188 1 8.070077 14035.156  1.254837   -.4359815    .1521021  .3982558
          "0604"  .3838821 1 7.751186 14605.357 2.2066605   -.6091864   .07289684  .4584838
          "0604"  .6544572 1 8.082533 12821.506  .7488332   -.6091864   .07289684  .4584838
          "0605"  .3947051 1 7.593437 10085.938  1.496268   -.5474447   .15735966  .4796238
          "0605"  .4623497 1  7.95922  13119.15  .5412642   -.5474447   .15735966  .4796238
          "0606"  .7540221 1 8.229076     11550  1.289126   -.6810366   .09963095   .432243
          "0606"  .3849983 1 8.064663 16278.212 1.5555378   -.6810366   .09963095   .432243
          "0607"  .4193938 1 7.797932 14304.688 1.0903636   -.5928362           0  .4018405
          "0607"  .6905069 1 7.976594 13876.798 1.1024722   -.5928362           0  .4018405
          "0608"  .5792593 1 8.032458 10151.563 2.2328703   -.5511262           0  .4595661
          "0608"  .2367999 1 7.926267 14680.617 1.0748092   -.5511262           0  .4595661
          "0609"  .5910156 1 7.581089  10303.75 1.4960815   -.5828385   .03797567  .4988764
          "0609"  .3881863 1 8.106725 14391.582  .8861421   -.5828385   .03797567  .4988764
          end
          statedist is the unique district identifier. time refers to the time period and dumtui is the treatment indicator. The rest of the variables are background covariates among which logfeediff, meaninc and avgeduhead varies across time. I have matched the treatment and control groups by psmatch2 in the baseline, but is it enough when the covariates are changing across time. It would be really nice, if I could get help on this issue with which I am stuck for a very long time.

          Comment


          • #6
            Sayoree Gooptu Show me the code you used to match the variables, please. I'll look at this in a few.

            Comment


            • #7
              Jared Greathouse Hi I have encountered similar situation as you describe. Are there any 'Dynamic' PSM that can be used to deal with time- varying treatment group (e.g. A is treated in 2019 while in the control group in 2020 then treated again in 2021).

              Comment

              Working...
              X