Announcement

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

  • Dear FernandoRios

    I am carrying out an evaluation of a sectoral legislation implemented in 2020, and I have annual cross section data for a previous period (2019) and all subsequent periods (2021 - 2023). The policy was applied once for all agents in the category.
    In this case, as there is no staggered treatment, to estimate the ATT for all years following implementation, is it preferable to use the csdid, or several 2x2 estimations with the drdid?

    Thank you very much in advance.

    Comment


    • its the same
      csdid carries on several drdid on the background

      Comment


      • Dear FernandoRios ,

        I have daily data concerning around 250 stocks. In my case, I am trying to study the effect of a tax that was first introduced in 2012 for 109 stocks. This list of stocks is updated every year. Therefore, I will have some companies that will no longer be taxed and others that will be newly taxed in 2013, for example, and so on.

        I have two problems.

        The first one concerns the frequency of my data. Using daily data from 2012 to 2023 results in a large number of observations, and the commands (csdid or did_multiplegt) do not work. Would it be better in my case to use monthly data?

        The second problem relates to the number of stocks that enter and exit each year, which varies between 5 and 20. Will this cause issues when I use the models from Callaway & Sant’Anna or the model from De Chaisemartin & D'Haultfœuille?


        Thank you.

        Emna

        Comment


        • Dear FernandoRios

          I hope this message finds you well.
          I am currently working on a DiD analysis using monthly firm-level data and encountered an issue with calculating the ATT.
          Despite trying multiple approaches, I haven't been able to resolve it.

          Here is the code I have been using:


          Code:
          csdid Y X, cluster(firm) time(month) gvar(start_date) method(reg) notyet
          estat all, wboot
          
          Pretrend Test. H0 All Pre-treatment are equal to 0
          chi2(567) = 7.994e+10
          p-value = 0.0000
          Average Treatment Effect on Treated
          ------------------------------------------------------------------------------
          | Coefficient Std. err. z P>|z| [95% conf. interval]
          -------------+----------------------------------------------------------------
          ATT | 0 (omitted)
          ------------------------------------------------------------------------------
          ATT by group
          ------------------------------------------------------------------------------
          | Coefficient Std. err. z P>|z| [95% conf. interval]
          -------------+----------------------------------------------------------------
          GAverage | 0 (omitted)
          ------------------------------------------------------------------------------
          conformability error
          r(503);
          
          end of do-file
          
          r(503);
          The output indicates a conformability error, and the ATT is omitted from the results.
          I'm unsure how to correct this. Could you possibly guide me on what might be causing this issue or suggest any modifications to my approach?

          Thank you very much for your time and help.

          Best regards,
          Xiao

          Comment


          • First thing first. Check how your gvar is constructed. And make sure that when tabulating year and gvar, it looks like what you will find in the example dataset

            Comment


            • Dear @FernandoRios

              Thank you very much for your guidance on checking the gvar and its alignment with the time variable in my dataset.
              Following your advice, I tabulated year and gvar and discovered the issue that was affecting the calculation of the ATT.
              After making the necessary adjustments, the model is now performing as expected.

              I truly appreciate your help in pointing me in the right direction. It was crucial in resolving the issue.

              Best regards,
              Xiao

              Comment


              • Dear FernandoRios ,

                I have a question on the e(gtt) matrix: Is there a list of error codes? I am running csdid on an unbalanced panel of firms, where observations both enter and exit during the observation period (including observations with gaps). The "error" column of e(gtt) therefore contains cohorts with errors 430, 504, 555 and 2000. I would like to investigate closer the source of the errors for the respective cohorts. Using the ado file of drdid (https://github.com/friosavila/csdid_...code/drdid.ado), I have only been able to trace down error code 555 as a failure of the mata function
                Code:
                is2x2()
                I attribute this to the missing data for this cohort. Errors 430 and 2000 only appear if I re-weight observations using a Propensity Score of being treated.

                Thanks tremendously for helping me out in my understanding and for providing the community with this estimator.
                Best wishes,
                Daniel
                Last edited by Daniel Prosi; 24 May 2024, 07:44.

                Comment


                • Dear all,
                  I have a setting with heterogeneous timing of reform introduction, and with the reform being of different intensity in each country. I have data on both years of introduction and intensity of treatment. Is there any way of exploiting both of these sources of information in a meaningful way? I've read work of Fong, Hazlett and Imai [FHI] on "Covariate balancing propensity score for a continuous treatment: application to the efficacy of political advertisements". Is is possible to combine it with CSDID (it has option "iweights")? If not, would you suggest some other approach (e.g. simply recentering data around reform introduction years, running standard DiD, and using weights from [FHI])?

                  Thank you in advance for all the help!

                  Comment


                  • Originally posted by Daniel Prosi View Post
                    Dear FernandoRios ,

                    I have a question on the e(gtt) matrix: Is there a list of error codes? I am running csdid on an unbalanced panel of firms, where observations both enter and exit during the observation period (including observations with gaps). The "error" column of e(gtt) therefore contains cohorts with errors 430, 504, 555 and 2000. I would like to investigate closer the source of the errors for the respective cohorts. Using the ado file of drdid (https://github.com/friosavila/csdid_...code/drdid.ado), I have only been able to trace down error code 555 as a failure of the mata function
                    Code:
                    is2x2()
                    I attribute this to the missing data for this cohort. Errors 430 and 2000 only appear if I re-weight observations using a Propensity Score of being treated.

                    Thanks tremendously for helping me out in my understanding and for providing the community with this estimator.
                    Best wishes,
                    Daniel
                    Hi Daniel
                    Yes, GTT error collects the error that was generated at some point of the estimation.
                    You are correct in that the best approach is to go for each cohort and time, and use drdid to look further. But if you want to explore the errors further, you may need to estimate everything manually.
                    F

                    Comment


                    • Originally posted by Mike Br View Post
                      Dear all,
                      I have a setting with heterogeneous timing of reform introduction, and with the reform being of different intensity in each country. I have data on both years of introduction and intensity of treatment. Is there any way of exploiting both of these sources of information in a meaningful way? I've read work of Fong, Hazlett and Imai [FHI] on "Covariate balancing propensity score for a continuous treatment: application to the efficacy of political advertisements". Is is possible to combine it with CSDID (it has option "iweights")? If not, would you suggest some other approach (e.g. simply recentering data around reform introduction years, running standard DiD, and using weights from [FHI])?

                      Thank you in advance for all the help!
                      csdid does not support iweights. Only pweights. But that should be enough to use weights from other procedures, as long as they are constant across panels (if you are using panel data)

                      Comment


                      • Dear @FernandoRios, and everyone else who can answer,

                        I want to use drdid. However, I have a very basic questions that I cannot seem to find an answer to: - How can I "test" for conditional parallel trends/pre-trends when drdid is used? (If this is not possible, what would one do instead?

                        Thank you in advance for your time and help!

                        Kind regards,

                        J
                        Last edited by Johanne Friedmann; 07 Jun 2024, 12:46.

                        Comment


                        • If you only have two periods parallel trend tests are not applicable.
                          ypu need more time or different groups otherwise

                          Comment

                          Working...
                          X