Announcement

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

  • Ahh, ok, for that I would refer to Sun and Abraham (2020). Basically, there is contamination, and dropping some years affect how that contamination affects all estimates.

    Comment


    • Thanks, will have to look at Sun and Abraham (2020). Thanks for suggesting it

      Comment


      • Hi Fernando,

        I want to run CSDID on an unbalanced panel. If I limit the data set to get a balanced panel, I will lose about 5% of the records. In this case, would you recommend to use panel estimator or cross section estimator?

        Thank you!
        Mingyu

        Comment


        • I would say balanced panel will work the best

          Comment


          • Thank you Fernando. I got different estimated coefficients from the two estimators. I will follow your suggestion to use the balanced panel.

            Comment


            • Originally posted by FernandoRios View Post
              I would say balanced panel will work the best
              Hi Fernando,

              I am sorry to bother you again on this. The results I got from using panel data estimator are quite different from the ones I got from repeated cross section estimator in terms of the magnitude of effects. Could you please advise me any possible reasons for this? I thought they should be somewhat similar.

              Thank you so much!
              Mingyu

              Comment


              • Different samples most likely
                and the fact that with repeated crossection you are using time varying covariates
                It will depend a lot on your data

                Comment


                • Originally posted by FernandoRios View Post
                  Different samples most likely
                  and the fact that with repeated crossection you are using time varying covariates
                  It will depend a lot on your data
                  Thank you Fernando!

                  Comment


                  • Dear FernandoRios ,

                    I have a firm-year panel. Each firm is situated in a state and a state can either belong to the western or the eastern part of the country. Treatment occurs at the state level. Eastern states are treated earlier than western state. There are both never-treated eastern and never-treated western states.

                    When running csdid with an east-dummy as independent variable (csdid y i.east, ivar(firm) time(year) gvar(gvar)) I get xxxxx for all gt-ATTs after a certain point. I assume this is due to problems with overlap but I actually don’t understand why: for all g and t, the east dummy does not predict treatment status perfectly since there are both never-treated eastern and never-treated western states. What am I missing?

                    This problem even occurs in a simulated dataset which is large and balanced. See my code below.

                    Code:
                    * DGP:
                    clear
                    set ob 100000
                    gen state=ceil(_n/10000)
                    gen east=(state>=6)
                    gen treated=(state==2 | state==4 | state==6 | state==8 | state==10)
                    gen firm=ceil(_n/10)
                    bysort firm: gen year=_n
                    gen gvar=state if treated==1
                    replace gvar=0 if gvar==.
                    gen ATT=(treated==1 & year>=gvar)
                    gen error=rnormal()
                    gen y=firm + state + year + ATT + east*year + error
                    
                    * CSDID with east-specific trends:
                    csdid y i.east, ivar(firm) time(year) gvar(gvar) wboot rseed(1234) dripw
                    Last edited by Caecilia Lipowski; 08 Aug 2022, 01:09.

                    Comment


                    • Hey FernandoRios ,
                      Can't thank you enough for csdid and jwdid and all the great public goods you are providing.
                      I wanted to ask you how I can use FE (not the time or cluster variable FE) in the csdid specification.

                      My TWFE is as follows:

                      gen stateyear=state*year
                      eventdd income, timevar(eventyr) method(hdfe, absorb(i.county i.year i.stateyear) cluster(county))

                      I am trying to run a csdid equivalent to the above specification. The closest that I could do is:

                      replace cohort=2014 if cohort==1
                      replace cohort=2016 if cohort==2
                      replace cohort=2017 if cohort==3
                      csdid income, ivar(county) time(year) gvar(cohort) method(drimp)

                      I could accommodate the i.county and i.year in the csdid specification but I don't know how to incorporate i.stateyear in this specification. Would you please guide me on how to do this?

                      Comment


                      • Originally posted by Vinitha Varghese View Post
                        Hey FernandoRios ,
                        Can't thank you enough for csdid and jwdid and all the great public goods you are providing.
                        I wanted to ask you how I can use FE (not the time or cluster variable FE) in the csdid specification.

                        My TWFE is as follows:

                        gen stateyear=state*year
                        eventdd income, timevar(eventyr) method(hdfe, absorb(i.county i.year i.stateyear) cluster(county))

                        I am trying to run a csdid equivalent to the above specification. The closest that I could do is:

                        replace cohort=2014 if cohort==1
                        replace cohort=2016 if cohort==2
                        replace cohort=2017 if cohort==3
                        csdid income, ivar(county) time(year) gvar(cohort) method(drimp)

                        I could accommodate the i.county and i.year in the csdid specification but I don't know how to incorporate i.stateyear in this specification. Would you please guide me on how to do this?
                        To my understanding, it seems that you have already included county FEs by using ivar(county).

                        Comment


                        • Hi Vinitha
                          im csdid you could control for county and year fixed effects *using ivar(county) and time(year).
                          You could add state fixed effects in the specification, and it would be as if you were interacting year with state. However, if you do so, you need to make sure that for every state, you have observations belonging to ALL cohorts. In other words, you need never treated units (if any), and units that were treated in all years defined by gvar.
                          If that condition is not met, you are violating the overlapping condition, and the results will be quite off. You do not want to do that.
                          F

                          Comment


                          • Hi Fernando,

                            May I ask if there is any help file regarding the differences between the panel data estimator and the repeated cross-sectional estimator used in CSDID?

                            Thanks,
                            Mingyu

                            Comment


                            • There will be
                              we are still working on finishing the companion paper.
                              but it all depends on the fact that repeated crossection uses time varying controls

                              Comment


                              • Originally posted by FernandoRios View Post
                                There will be
                                we are still working on finishing the companion paper.
                                but it all depends on the fact that repeated crossection uses time varying controls
                                Thanks Fernando. I look forward to your paper! But is there any reason why you can't accommodate time varying controls in panel estimator? I'm asking this question because I feel like it's quite common to use time varying controls in two-way fixed effects model.

                                Comment

                                Working...
                                X