Announcement

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

  • Estimating a DID Quantile treatment effects

    Dear statalist,

    I am trying to estimate a Quantile treatment effect in the context of DID estimation using two-year data. While I am aware that quantile treatment effects can be estimated using the ivqte Stata code for Firpo (2007) estimator, I am not acquainted with using DID quantile treatment effect in Stata.



    I have data collected from RCT for two years, one year before the intervention, and one year after the intervention.

    I really appreciate your suggestion on this.


    Thank you!








  • #2
    Hi Fissha
    I think it would be possible to estimate something equivalent to DID quantile treatment effects using -rifhdreg- (part of the -rif- package from SSC)
    it could be done using a more traditional specification of the DID set up
    Code:
    egen dd=group(treat time), tag
    rifhdreg y i.treat i.time i.treat#i.time x1 x2 x3 , over(dd) rif(q(50))
    So, in theory, this can be applied to estimate the quantile treatment effects. The main difference with ivqte is that instead of using a reweighting strategy (as Firpo(2007) suggests), you control for differences directly in the model.

    HTH


    Comment


    • #3
      Many thanks, FernandoRios for your quick help.


      As you said it seems plausible to use it for DID quantile treatment effect. But is there any option for clustering for the standard errors as I am using the fixed-effect model. If I want to estimate at different levels of quantile like 10,20,...100. also, should I estimate for each quantile one by one or there is an option to specify the range of the quantiles to be used?



      Thank you!

      Comment


      • #4
        well, I think fixed effects can be easily applied with rifhdreg, using the "abs()" option. and you can also request "cluster" standard errors.
        regarding the different quantile effects, there is the option of using "rifsureg" (see the help file), when you can define multiple quantiles, but sureg does not admit fixed-effect models like areg, xtreg or reghdfe (which my command relies on).
        So I think the only option may be doing for each quantile separately.

        Comment


        • #5
          Thank you so much FernandoRios.

          It is really helpful.

          Comment


          • #6
            Dear Fissha,
            I suggest that you have a look at Athey and Imbens (2006, "Identification and Inference in Nonlinear Difference‐in‐Differences Models", in Econometrica). They suggest a different model and show that it is more natural than other models, in particular than the quantile DID. I have implemented their estimator: https://sites.google.com/site/blaise...ata?authuser=0
            Blaise

            Comment


            • #7
              Many thanks, Prof, Blaise!


              You are right that the Change in Change method coined by Athey and Imbens is a better approach to do this. It is particularly applicable in my case as the available data is for two years only. In fact, Havnes and Mogstad used CIC with RIF DID in their paper https://www.sciencedirect.com/scienc...4000899#ec0005.



              But at this point, I want to learn one thing. As the treatment is randomly assigned with full compliance in my case, what is the problem of using fixed-effect quantile regression with the usual DID model?

              That means estimating the following model using the xtqreg developed by J.A.F. Machado and J.M.C. Santos Silva.


              Income =B0+B1Treat+B2Post+B3Treat_Post+ai where the treatment effect indicator will be B3 and ai is the fixed effect indicator.



              Machado, J.A.F. and Santos Silva, J.M.C. (2019), Quantiles via Moments, Journal of Econometrics, 213(1), pp. 145-173.



              Thanks.

              Comment


              • #8
                If the treatment is randomized you don't even need panel data! You can simply compare the treated and the control units using only the second period.

                I think that the Machado and Santos Silva estimator is not recommended if you have only two periods because it suffers fro the incidental parameter bias. The number of time periods must go to infinity for consistency. The changes-in-changes is specifically developed for two time periods.

                Comment


                • #9
                  Hi Fissha,
                  Thank you for the reference! I think that what they do is what I suggest with my own implementation. But will revise that further.
                  Regarding xtqreg. Two things to consider
                  1. xtqreg is based on the method of moments, which imposes the assumption of monotonicity of all quantile coefficients.
                  2. similar to qreg, xtqreg could be interpreted as a "conditional" effect. the method I suggest, and I think the CIC strategy, estimate unconditional effects.
                  The difference:
                  - unconditional effects compare the whole distribution, (after adjusting for other characteristics)
                  - conditional effects compare conditional distributions, in other words, conditional on the characteristics and specification.

                  So, I think, this will depend on what is your research question, and what you are trying to answer.
                  Best


                  Comment


                  • #10
                    Thank you so much, Blaise and FernandoRios for your nice explanations.

                    It is quite interesting and helpful.

                    Comment


                    • #11
                      Hi Fernando,
                      I am wondering if the variable "dd" is lost before options? i.e.
                      Code:
                      rifhdreg y dd i.treat i.time i.treat#i.time x1 x2 x3 , over(dd) rif(q(50))
                      looking forward to your answer, thanks!

                      Originally posted by FernandoRios View Post
                      Hi Fissha
                      I think it would be possible to estimate something equivalent to DID quantile treatment effects using -rifhdreg- (part of the -rif- package from SSC)
                      it could be done using a more traditional specification of the DID set up
                      Code:
                      egen dd=group(treat time), tag
                      rifhdreg y i.treat i.time i.treat#i.time x1 x2 x3 , over(dd) rif(q(50))
                      So, in theory, this can be applied to estimate the quantile treatment effects. The main difference with ivqte is that instead of using a reweighting strategy (as Firpo(2007) suggests), you control for differences directly in the model.

                      HTH

                      Comment


                      • #12
                        No it isn’t missing
                        i simply used treat and time and the interaction instead of DD
                        also this may not work for Two way fixed effects, as has been recently discussed

                        Comment


                        • #13
                          yes, you are right! I didn't notice that.
                          Sorry for that, and Thanks!

                          Comment

                          Working...
                          X