Announcement

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

  • csdid: ATT omitted

    Hi all,

    I am using csdid to estimate treatment effects in a staggered DID, and I am running into problems once I add control variables. My data are an unbalanced firm-year panel.


    Obs Mean Std. Dev. Min Max
    Independent Variables
    Treated 968 0.1384 0.3455 0.0000 1.0000
    Dependent Variables
    Green Patent 532 1.1838 1.4638 0.0000 7.1017
    Control Variables
    Firm Age 536 2.9363 0.2992 1.9459 3.8067
    Firm Size 541 22.8617 1.7382 19.3825 30.5711
    Leverage 541 -0.8723 0.5661 -3.0372 0.1113
    Liquidity 632 -0.6472 0.4451 -2.7989 -0.0285
    Shareholder Rate 508 3.5292 0.4721 1.9330 4.4129
    (Treat=0: 834; Treat=1: 134)

    My baseline specification is: csdid ptotal size liq large age lev , ivar(firmid) time(year) gvar(firstyear) method(dripw) vce(cluster firmid)

    In some specifications, the estimation results become almost empty, or the ATT estimates disappear for many (g,t) cells.

    When I run estat simple, I do not get a single ATT estimate.

    I wondered whether the issue could be due to the limited number of observations, but unfortunately, the dataset cannot be expanded for the core variables because of data availability constraints.

    Is there any way to solve this problem?

    Many thanks in advance for any guidance or suggestions.


    Best,

    Harrite

  • #2
    Harriet:
    welcome to this forum.
    As per FAQ, please also post what Stata gave you back when using the community-contributed module (as another FAQ recommends us to name all the modules elaborated by Stata users and approved by KitBaum) -csdid-. Thank you.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      The two likely cases are
      Your Cohort time specific sample is too small.
      or there is no combination of that cohort and time.
      CSDID still produces the combination (as seen in the table) just because I coudlnt find a way to correct that at the time
      F

      Comment


      • #4
        Hi Sir

        I have a question regarding the CSDID estimator (and other Diff-in-Diff estimator with staggered treatment adoption). Is it possible to include lags of the dependent variable as covariates in order to account for dynamics?

        In addition, my model includes some covariates. Can I use one-period lags of these covariates to reduce potential reverse causality?

        Thanks in advance.

        This my model :

        global covars1 Lag_ln_itaxrevenueworld Lag_GDPpcConst Lag_AgriVadded Lag_UrbanPop

        csdid ln_itaxrevenueworld $covars1, ivar(id) time(year) gvar(first_dr_year) method(dripw) rseed(1) agg(event) notyet saverif(_rif_)

        Comment


        • #5
          CAn you add lags. Yes
          Should you? I cannot say either way. It will all depend on whether or not there is enough variation to estimate the ATTs

          Comment


          • #6
            Thank you for your feedback!

            Comment


            • #7
              Hi Sir,

              I have another question. In my final results for World, the table does not show the number of observations. I restricted the window to +/- 5 years before and after the treatment. How can I include the number of observations in the table?

              I checked the scalar e(N), but it shows the total number of observations for the baseline, before applying the window restriction. How can I get the number of observations within the restricted window (+/- 5 years around the treatment)?

              Here is my code:


              global covars1 Lag_ln_itaxrevenueworld Lag_GDPpcConst Lag_AgriVadded Lag_UrbanPop


              *================================================= ====
              * NOT-YET-TREATED
              *================================================= ====

              csdid ln_itaxrevenueworld $covars1, ivar(id) time(year) gvar(first_dr_year) method(dripw) rseed(1) agg(event) notyet

              estat event, window(-5 5) estore(csdid_model1a)
              estat pretrend, window(-5 5)
              estat cevent, window(-5 5)

              event_plot csdid_model1a, default_look graph_opt(xtitle("Periods since the event") ytitle("Average effect") ///
              title("csdid") xlabel(-5(1)5)) stub_lag(Tp#) stub_lead(Tm#) together


              estat event, window(-10 10) estore(csdid_model1b)
              estat pretrend, window(-10 10)
              estat cevent, window(-10 10)

              event_plot csdid_model1b, default_look graph_opt(xtitle("Periods since the event") ytitle("Average effect") ///
              title("csdid") xlabel(-10(1)10)) stub_lag(Tp#) stub_lead(Tm#) together




              *================================================= ====
              * NEVER-TREATED (default control group)
              *================================================= ====

              csdid ln_itaxrevenueworld $covars1, ivar(id) time(year) gvar(first_dr_year) method(dripw) rseed(1) agg(event)

              estat event, window(-5 5) estore(csdid_model2a)
              estat pretrend, window(-5 5)
              estat cevent, window(-5 5)

              event_plot csdid_model2a, default_look graph_opt(xtitle("Periods since the event") ytitle("Average effect") ///
              title("csdid") xlabel(-5(1)5)) stub_lag(Tp#) stub_lead(Tm#) together

              estat event, window(-10 10) estore(csdid_model2b)
              estat pretrend, window(-10 10)
              estat cevent, window(-10 10)

              event_plot csdid_model2b, default_look graph_opt(xtitle("Periods since the event") ytitle("Average effect") ///
              title("csdid") xlabel(-10(1)10)) stub_lag(Tp#) stub_lead(Tm#) together

              *================================================= ====
              * Import results
              *================================================= ====

              esttab csdid_model1a csdid_model2a using "csdid_results.rtf", ///
              se(3) b(3) star label ///
              title("CSDID RESULTS") ///
              mtitles("Not-yet treated" "Never-treated") ///
              keep(Tm* Tp* Pre_avg Post_avg) ///
              replace


              esttab csdid_model1b csdid_model2b using "csdid_results.rtf", ///
              se(3) b(3) star label ///
              title("CSDID RESULTS") ///
              mtitles("Not-yet treated" "Never-treated") ///
              keep(Tm* Tp* Pre_avg Post_avg) ///
              replace

              Comment


              • #8
                unfortunately that is not easy to obtain.
                Because of How CSDID uses nottreated and not-yet treated, its hard to keep tract of sample sizes, specially when using restricted ouputs.

                Comment


                • #9
                  Okay, Thank you!

                  Comment

                  Working...
                  X