Announcement

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

  • Staggered Difference-in-Differences using csdid

    Dear all,
    I'm trying to run the csdid command in Stata to estimate a difference-in-differences model with staggered treatment adoption. However, when I run the command: csdid cons_per_capita, ivar(country_id) time(year) gvar(group_year)
    I get empty output tables — no estimates, coefficients, or standard errors appear.

    Here’s a bit more about my setup:
    • cons_per_capita: my outcome variable (float).
    • country_id: unique identifier for each country (long).
    • year: time variable (2000, 2001, ... , 2024).
    • group_year: the year each country adopts the treatment (varies across countries). For countries that were never treated, group_year is 0. For countries that have not yet been treated, group_year is also 0, and once the treatment occurs, group_year takes the value of the treatment year.
    I've double-checked the variables, and the dataset looks properly formatted. Each country has multiple years of data, and treatment starts in different years for different countries.

    Things I've tried:
    • Ensured no missing values in key variables.
    • Verified group_year is coded correctly (some units stay untreated throughout).
    Has anyone run into this issue before? Any ideas what might cause empty tables in csdid?

    Thanks in advance!


  • #2
    Show the cross tab between gvar and year

    Comment


    • #3
      Click image for larger version

Name:	tab.jpg
Views:	1
Size:	82.9 KB
ID:	1774433

      Here it is!

      Comment


      • #4
        That’s the rerror
        gvar has to be there through all periods

        Comment


        • #5
          That’s the rerror
          gvar has to be there through all periods
          also with so few treated variables do not add any controls

          Comment


          • #6
            Thanks, that worked. So, due to low number of treated observations I won't be able to add not-yet treated units as controls?

            Comment


            • #7
              You can
              that isn’t a problem
              madding covariants is
              yoi are basically making regressions with n=1 in those cases

              Comment

              Working...
              X