Announcement

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

  • Hi, @FernandoRios Thank you so much for the valuable work. I'm using firm level panel data, I'm trying to analyse the effect of a program. This program is giving support to new tech start-ups. So, none of the intervention group has a "before" record. Maybe because of that (or maybe I am making a coding error.) I am getting results full of x's and all years’ effects are equal to 0 and omitted, 0 observations also. Do you have any idea?

    Comment


    • Dear FernandoRios ,

      thank you very much for all your helpful replies.
      I have a doubt about how the csdid command with a panel estimator can both include individual fixed effects and time-invariant covariates that only vary across individuals. You frequently posted that csdid command does not allow to include both time and individual fixed effects because the way it works it automatically includes that information in the specification. However, if I run the following regression I get results and that are different from each other:
      Code:
      use https://friosavila.github.io/playingwithstata/drdid/mpdta.dta, clear
      
      *this should include individual FE (countyreal) by default
      qui csdid  lemp , ivar(countyreal) time(year) gvar(first_treat) method(reg)
      estat simple
      
      qui csdid  lemp i.countyreal, ivar(countyreal) time(year) gvar(first_treat) method(reg)
      estat simple
      How is that possible?

      Moreover, I don't understand well how lpop can be included in the regression, shouldn't be collinear with the individual FE at the countyreal level? Sorry if it sounds naive.
      Thank you very much in advance for your reply!
      Best,
      Samuel

      Comment


      • Hi Samuel
        you have a very good question. And, to be honest, I had similar questions before I started digging deeper into the method (and of course writing the command).

        So 1) why are the results different?
        because by adding "countryreal" as explicit control, you are violating the overlapping assumption.

        2) how can you add lpop in the model?
        Because drdid and csdid are essentially adding lpop interacted with a time variable. Which is not colinear with individual FE

        Specifically, for panel data, you are modelling
        DY = b0 + b1 x+ e at T=0

        This basically imposes the assumption that the change in the outcome should depend only on "base period/earlier period" characteristics. Not characteristics that COULD have been after by the treatment (post period)

        HTH
        F







        Comment


        • Dear FernandoRios !

          In my data i do not have never-treated units. The treatment has staggered adoption and i used not-yet treated as a comparison group for eventually treated units. Further the results are derived using unconditional parallel trend assumption (so i do not have any covariates in the model) - This is my design. I have following set of questions:

          Q.1) I run the following code:

          Code:
          csdid ln(y) , ivar(id) time(year) gvar(first_treat) notyet method(dripw) saverif(A1)
          in order to calculate events study parameters, i run
          Code:
          use A1, clear
          csdid_stats event, estore(event1)
          esttab event1, se

          This gives me the coefficients on event leads and lags. In addition to that, it gives two more coefficients post_Avg and pre_Avg. I want to ask, is post_Avg and overall ATT across all event time after treatment (e > 0) and pre_Avg an overall ATT across all event times before treatment. Can i regard post_Avg and pre_Avg as the aggregation obtained in equation- (3.12) in Callaway and Sant'Anna(2021)

          Similarly, i run the following code to obtain group-specific effects

          Code:
          use A1, clear
          csdid_stats group, estore(group1)
          esttab group1, se
          This gives me the coefficients on each group across all their post-treatment periods. But also gives a coefficient GAverage. I want to ask, is GAverage an overall ATT across all groups. Can i regard GAverage as the aggregation obtained in equation- (3.11) in Callaway and Sant'Anna(2021).

          I run the following code to calculate calendar time effects

          Code:
          use A1, clear
          csdid_stats calendar, estore(calendar1)
          esttab calendar1, se
          This gives me the coefficients on each calendar time across all groups. But also produces coefficient CAverage. I want to ask,is CAverage an overall ATT across all calendar time periods.Can i regard CAverage as the aggregation obtained in equation- (3.12) in Callaway and Sant'Anna(2021).

          Q.2) While running the csdid command above, i specify method(dripw). Since i do not have covariates in my model (i estimate the results using unconditional parallel trend assumption) can i still regard the r estimated results as Doubly-Robust or i need to specify other estimation method in the command line above, like method(reg) or method(ipw) etc. OR it does not matter in this case as propensity scores will just be constant ? Please throw some light on this.

          Thanks,
          (Ridwan)

          Comment


          • Hi Ridwan
            so
            q1) yes, those are my interpretations of the Group, event (pre and post) and calendar aggregate ATTs. the results will differ a bit from R's version because of slightly different weighting schemes we did. However, both schemes are valid.
            q2) No, it is not a double robust. That is why when there are no controls, ALL estimators are the same. (except for standard errors on one of the estimators, which I do not remember at the time)

            In fact, to speed things up, a new version of csdid (not on ssc yet) will use method(reg) as default when there are no covariates, to speed estimations.

            HTH
            F

            Comment


            • Thanks FernandoRios for confirming this to me.
              regarding q2) Yes you are right, when there are no-covariates all the estimation methods i.e., method(drimp); method(dripw); method(reg); method(ipw) etc. produce same results

              best,
              (Ridwan)

              Comment


              • Dear Fernando,

                I would like to ask a likely very trivial question (and I apologise for this in advance).
                I am running the following command:
                Code:
                 csdid `var' , ivar(OBJECTID) time(year) gvar(treat_year) agg(event) level(90)
                csdid_plot, style(rarea) legend(off)
                And I get the following outputs:
                Click image for larger version

Name:	Screenshot 2022-06-23 at 17.44.33.png
Views:	1
Size:	550.2 KB
ID:	1670634

                And:
                Click image for larger version

Name:	cs_cell_counter_admin2full.png
Views:	1
Size:	182.8 KB
ID:	1670635
                Could you please tell me why the plotted ATTs are different from the values displayed in the regression table?

                Thank you very much for your help in advance!
                Best,
                Gabor

                Comment


                • THey shouldnt!
                  so first of all, can you make sure you have the latest versions of csdid and drdid?
                  ssc install drdid, replace
                  ssc install csdid, replace

                  after that, try creating the plot again, and let me know what happens
                  F

                  Comment


                  • Dear Fernando,

                    Thank you very much for your quick reply! I updated drdid and csdid, but, unfortunately, the problem still persists.
                    If that would be useful, I can share the data with you.

                    Best,
                    Gabor

                    Comment


                    • In fact, you can access it here.

                      Comment


                      • Ahh ok. Yes, a minor thing that has not been updated yet
                        1) when using csdid, it is far better to call on estat event to make the plots
                        2) because I have added the pre and post means in estat event, csdid_plot no longer gets the right numbers to create the plot

                        So, do the following

                        csdid `var' , ivar(OBJECTID) time(year) gvar(treat_year)
                        estat event,
                        csdid_plot, style(rarea) legend(off)
                        Unfortunately, I didn't include the "level" option in estat, but it is there for csdid_stats.
                        F

                        Comment


                        • Dear Fernando,

                          Thank you very much! I am now running the following command:

                          Code:
                          csdid `var' , ivar(OBJECTID) time(year) gvar(treat_year)
                          estat event,
                          csdid_plot, style(rarea) legend(off)
                          But the coefficients and the plotted values are still different. Is this expected?
                          I'm sorry if I misunderstood something.

                          Best,
                          Gabor

                          Comment


                          • can you show me what is what you are getting ?

                            Comment


                            • Dear Fernando,

                              Sure! I am getting the same output that I shared before for the first and last lines, and I, additionally, get the following after running "estat, event":


                              Click image for larger version

Name:	Screenshot 2022-06-23 at 19.34.45.png
Views:	1
Size:	579.5 KB
ID:	1670657

                              Best,
                              Gabor

                              Comment


                              • *"estat event," I am sorry.

                                Comment

                                Working...
                                X