Announcement

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

  • Hi Sabina
    you are right. the ivar corresponds to the PANEL id.
    In other words, if you were to do something like
    xtset id year,
    it should come without any errors. Otherwise, ID is not your panel.
    Hope this helps
    Fernando

    Comment


    • Hello everyone, I am currently studying the Difference-in-Differences (DID) analysis method and have encountered a problem. My dependent variable is a binary discrete variable with values 0 and 1. Can I use the CSDID command for this? If not, what command should I use for a multi-timepoint double-difference analysis? I really hope to receive responses from everyone.

      Comment


      • Originally posted by FernandoRios View Post
        Hi Sabina
        you are right. the ivar corresponds to the PANEL id.
        In other words, if you were to do something like
        xtset id year,
        it should come without any errors. Otherwise, ID is not your panel.
        Hope this helps
        Fernando
        Dear Fernando,
        Many thanks for your help. Best regards

        Comment


        • Dear FernandoRios ,

          I have a doubt about how the methods of csdid command work, specially because when i use drimp, this method uses fewer observations (2000 aprox in my data) than the others (dripw, reg and stdipw). Do you have any idea why this happens?

          Comment


          • Yes, DRIMP is far more restrictive in regards to balancing. So its more likely that some of the 2x2 cases could not be estimated.
            In contrast reg (linear regression) uses all data without checking for balance, and dripw is less restrictive on that

            Comment


            • Originally posted by Tan sunny View Post
              Hello everyone, I am currently studying the Difference-in-Differences (DID) analysis method and have encountered a problem. My dependent variable is a binary discrete variable with values 0 and 1. Can I use the CSDID command for this? If not, what command should I use for a multi-timepoint double-difference analysis? I really hope to receive responses from everyone.
              You can,
              although yo could also use jwdid with method(logit), as suggested by Prof Wooldridge

              Comment


              • Hi Fernando!
                As I have written in a previous question, I am trying to grasp the difference between a regular TWFE-model and the csdid-model (without controls and matching), and how one can explain different pre-trends between the two models.

                From my understanding, one such key difference would be that the csdid-model takes treatment timing into account. Rather than comparing the aggregated average difference between the treated and untreated group, it compares only observations with a certain treatment timing with other untreated observations that were not treated.

                Would you say that this is a correct understanding of csdid?

                Best,
                Katarina

                Comment


                • For the How can you explain the differences? I would go and cite/read the plethora of DID lit reviews that came out last couple of years.
                  In any case, the main difference between CS and TWFE with leads and lags is that CS (as Sun Abraham does, and ETWFE proposes implicitly) is simple TWFE only assumes variation in relative timing of the treatment, not heterogeneity based on the absolute timing.
                  CS (and the others) assume heterogeneity comes from both sources, so you should interact the leads and lags with "when" a unit was treated.

                  F

                  Comment


                  • Thank you!

                    Another question:
                    I am a little confused regarding the reference period for the event study command in csdid. I assume that the omitted category is – 1, i.e. the time period prior to treatment. However, both with the commands estat event and csdid_plot, all periods are reported (i.e. Tm3, Tm2, Tm1, Tp0, Tp1, Tp2 and so on). How should one understand this?

                    Best,
                    Katarina

                    Comment


                    • Yes, that is really a missunderstanding to the methodology itself.
                      If you read Callaway and Sant'anna (2021) the way they set up the estimator they define all pretreatment ATTs as short pretreatments. Thus for Tm1 you compare T-1 to T-2, for Tm2 you compare T-2 to T-3 so on and so forth.
                      This is also how the Stata official command xthdidregress reports results.
                      Now for standard event studies, one usually compares outcomes to the last period before treatment T-1. So there should d not be a tm1, but only observe things starting at T-2 and so forth.
                      In R, they use the term "Base+universal" but in my implementation you need to use option -long2-.
                      HTH
                      F

                      Comment


                      • Thank you for answering – that really helped. However, I have three additional questions.

                        1)
                        I want to estimate the aggregated effect of cost of a policy change for the first seven years after the intervention.
                        For this, I am using the command:
                        estat cevent, window(0 7)
                        However, I have some difficulties with the basic interpretation of the command. If the result is -0.05 would that mean that a) the average yearly cost decrease of the intervention is 5 percent? Or b) that the aggregated effect of the first seven years is a cost decrease of 5 percent?

                        2)
                        Furthermore, I estimate the effects of the same policy change on two different outcomes using the dripw option. Can I assume that, if I include the same covariates, the observations would be matched in the same way/assigned the same propensity scores across the two models (outcomes)?

                        3)
                        In addition, I have a hard time understanding if the dripw command does something in settings where there are no covariates included. From my understanding propensity scores are not utilized in settings under the unconditional parallel trend assumption.

                        Thank you again for all your help with answering questions and providing a better understanding of the package!

                        Best,
                        Katarina

                        Comment


                        • 1) the average effect on the first 7 years (8 including the moment of implementation)
                          2) yes. The outcome only affects the regression step not the ipw step(unless samples change)
                          3) without covariates all methods collapse into comparison of means

                          Comment


                          • Great, thank you once again!

                            As clearly described in the literature, one of the problems with TWFE models is that it does not consider treatment heterogeneity. I wonder if the csdid model – and the possibility to look at calendar and group-specific effect through the estat calendar and estat group commands – can be used to argue that such treatment heterogeneity occurs?

                            For instance, in my case, the calendar time effect of treatment in 2000 would be -0.591 (highly significant) while the calendar time effect in 2014 would be -0.087 (non-significant). Would this be a sign of strong treatment heterogeneity?

                            Furthermore, would stark differences between different groups (group-specific effects) also imply treatment heterogeneity?

                            I guess that similar coefficients across group-specific and calendar time effects would imply the opposite, i.e. signs of treatment homogeneity.

                            Best,
                            Katarina

                            Comment


                            • Dear FernandoRios !

                              I have an unbalanced panel with staggered adoption and no never-treated in my sample.
                              I am running the following:

                              Code:
                              csdid lnY, ivar(id) time(year) gvar(first_complied) method(dripw) notyet long saverif(rifA) wboot
                              To obtain the event study, estimates with p-values and significance level reported at 1%, 5% and 10% levels respectively, I run the following codes:

                              Code:
                              estat event, estore(event1)
                              esttab event1, se star(* 0.10 ** 0.05 *** 0.01)
                              Results: The post-treatment dynamic effects at different event horizions for example are:
                              Tp1 - siginifcant at 5% (**) ; Tp2 - siginifcant at 5% (**) ; Tp3 - siginifcant at 1% (***) ; Tp4 - siginifcant at 5% (**) ; Tp5 - siginifcant at 5% (**) ; Tp6- siginifcant at 5% (**) ; Tp7 - siginifcant at 10% (*)


                              To plot the same, i use rif(rifA) with "wboot" se as:

                              Code:
                              use rifA, clear
                              
                              qui:csdid_stats event, wboot rseed(1)
                               csdid_plot
                              Question1: Even though, the coefficient are significant at 5% for (e=1, e=2, e=4, e=5, e=6), why does the 95% CI (whiskers) include the zero-axis (for example at e=5)

                              In CSDID, the pre-treatment coeffs'.are short-differences (comparison b/w t and t-1) and post-treat coeffs'. are long differnces (comparison b/w period g after treatment to period just before treatmet g-1). This assymetry as Jonathan Roth showed will lead to jump at treatment date

                              Question 2: How do we use long diffferences in both pre-and-post cases. I have specified option long in the code above. Does it accomodiate for using long differences in both pre-and-post periods.

                              Question 3: I have specified ivar(panelvar) to apply the panel estimator, but i have read in the thread above that, we should instead use cluster(panelvar), when the panel is unbalanced.
                              I am not sure, what kind of estimator should i report?




                              Click image for larger version

Name:	IMG.png
Views:	1
Size:	33.4 KB
ID:	1743376

                              Comment


                              • Hi there
                                So, you should use -long2- option. Post treatment are always long differences.
                                And I think we went over this before. My position is to use panel when panel is available (even if unbalanced). You could try using cluster, which uses all data, but applies no individual fixed effects
                                F

                                Comment

                                Working...
                                X