Announcement

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

  • #16
    1. Yes they are inverted! It was a tuypo which I think i never correct on my own computer
    The very last column should be the Nr of Treated units.

    2. What happens is that when using panel data, I was originally reporting the number of panel units not the number of observations. Which I change since, because people wanted to see how many observations were being used in the command.
    The detailed number of observations e(gtt) was an attempt to provide more information on the sample sizes , specially when one has missing data or repeated crossection.

    For the other question. I think the difference affects only if you are interested in ATTGTs before treatment. (pre-treatment)

    So the default with csdid and DID are the same. However, if you want the new feature, you need to use the option -long-. This calculates long pseudo treatment effects.
    If you are interested on the actual formulas , check pg 34 on my slides here
    https://friosavila.github.io/playing...did_csdid.html
    Fernando


    Comment


    • #17
      Dear FernandoRios,

      thank you very much for your explanations!! Now it is all clear to me.
      Samuel

      Comment


      • #18
        Dear FernandoRios ,

        As I am trying to use the latest DRDID package in Stata, I have encountered the error message saying that I donot have a 2 times 2 structure. However, I have already collapsed my (panel) data into two periods and the treatment variable is a dummy as well. Please see the following tabulation result. I am wondering if there is anything else that could possibly cause the 2*2 error?

        The command I am using is as follows

        drdid outcome x1 x2 x3 x4, ivar(id) time(year) treatment(treat_status) cluster(id)

        Covariates x1-x4 remains time invariant in the data and has pre-treatment value for each individual id.

        Thanks
        Xian
        Click image for larger version

Name:	Screen Shot 2022-01-30 at 12.51.57 PM.png
Views:	1
Size:	45.0 KB
ID:	1647493

        Last edited by Xian Zhang xixixi; 30 Jan 2022, 13:59.

        Comment


        • #19
          mmm. two points
          1.If you are using "ivar(id)" there is no need to also do "cluster(id)".
          2. Can you do :
          ssc install distinct
          distinct id
          That will help me see what may be happening.
          Thank you

          Comment


          • #20
            Thanks for your response FernandoRios , I ran the distinct id and looks like individual only shows up twice.
            Click image for larger version

Name:	Screen Shot 2022-01-30 at 5.49.50 PM.png
Views:	1
Size:	19.9 KB
ID:	1647513
            Last edited by Xian Zhang xixixi; 30 Jan 2022, 18:50.

            Comment


            • #21
              Sorry i cannot see why this could be happening.
              Can you share a subsample of your data (by email?) That way i can try and check on my computer
              Thank you

              Comment


              • #22
                FernandoRios , Sorry I cannot really share the data with you. I also used the same dataset, transformed it into "cross sectional" format and used absdid to estimate it and I actually got a proper estimate of the ATT. Not sure if this is helpful for you though.

                Comment


                • #23
                  Hi All,

                  I have slightly different question and problem from @Marcela Vieira.

                  I have a repeated cross-sectional dataset spanning over 2003, ..., 2021. My identification is a policy that started in 2008 and reviewed every three years. That is 2008, 2011, 2014, 2017, and 2020, hence each review period is considered to be a treatment. This policy is absorbing such that units in 2021 were treated in 2020. My unit of analysis is household and individual.

                  I want to run the csdid by Callaway and Sant'Anna (2021) using a repeated cross-sections data. In the original paper and STATA documentation, there is an example of its application using a panel data - mpdta, but none on repeated cross-sections data. Hence, can someone show, suggest a link, or demonstrate using detailed stepwise process for implementing the csdid package on repeated cross-sections dataset?

                  Thanks for your help in advance.

                  Best,
                  Davidmac
                  Last edited by Davidmac Ekeocha; 14 Mar 2023, 21:44.

                  Comment


                  • #24
                    Hello, I am analyzing the impact of SWIFT sanctions (treatment) on exports and imports of countries (outcome) using DiD. I have quarterly panel data spanning from q1 2005 to q4 2019 for 4 countries. I have two countries in my control group and 2 countries in my treatment group. The issue I am facing is that I have two different treatments. The first treatment is the threat of SWIFT sanctions due to a non-binding resolution of the EU allowing SWIFT to sanction one of the country in the control group. The second treatment is the actual imposition of SWIFT sanctions against the other country in the treatment group. The goal of my study is to compare the treatment effect of a threat of SWIFT sanction with the treatment effect of an actual imposition of SWIFT sanction.

                    Furthermore, the two treatments occur at different time periods, the actual SWIFT sanction occurs at q1 2012 and the threat of SWIFT sanction occurs at q3 2014, for each country in the treatment group respectively.

                    My question is the following: can I simply use a heterogeneous DiD like

                    xtset country_n quarterly
                    xthdidregress twfe (log_export) (swift), group(country_n)

                    and interpret the ATET graphs of each cohort, knowing that the treatments are different? I feel like that isn't right.

                    If anyone can help, I am really new on Stata so please let me know if you need more context or information.

                    Thank you!

                    Comment

                    Working...
                    X