Announcement

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

  • CSDID validity assumptions

    Dear Statalist members,
    I'm trying to estimate changes in country legislation on corporate investment. To do this, I'm running a CSDID model, considering that one country was never affected by this legislation and other countries adopted the policy starting in 2014 and 2017, respectively. However, I'm not really experienced with scaled panel models. Since the number of companies per country in an annual sample ends up being very small, and not all companies have examples in every year, many values are being omitted. I'd like to better understand two points of the model. Regarding the line parallelism test, when I run the stat all, I obtain the Pretrend TST. H0: All Pre-treatment are equal to 0, chi2(8)=19.7415, p-value = 0.0114. In this case, can I conclude that All pre-treatment are equal to zero, so they are parallel? It's really confuse for me at this moment. Furthermore, when I run the model, Pre_avg and Post_avg Std. err., Z, and P|z| are equal to (.). With these values, are the model's assumptions still being met? I thank you all in advance for your help.

  • #2
    It looks like you’re rejecting parallel trends. And do you really have a panel where the same firms, or largely the same, appear every year? How many years in total?

    Comment


    • #3
      .

      Comment


      • #4

        Thank you, Professor Wooldredge. Your response made me very happy, as the main test I am performing is the Pretrend test: H₀: All pre-treatment variables are equal to 0. The result, χ²(8) = 3.4840 and p-value = 0.8369, confirms the parallel trends assumption for this sample. The analysis initially covered 14 years, but since one of the countries lacked observations between 2021 and 2023, I dropped this period. I am now working with 11 years of data and believe that the same firms, or largely the same, appear throughout the panel. The results of the xtdescribe command support this, as detailed below:
        Although the panel is unbalanced, it retains a strong longitudinal structure: a substantial proportion of firms (over 75%) are present in most of the 11 years, and nearly one-third of firms are observed throughout the entire period. Therefore, it is reasonable to conclude that largely the same firms appear across years, ensuring the validity of panel-based estimations like xthdidregress twfe.
        However, the coefficients for Pre_avg and Post_avg (Std. err., z, and P>|z|) remain omitted. Would you recommend dropping firms that do not appear in all periods to work with a more balanced panel? I also attempted to apply your xthdidregress twfe model using countries as the group variable, but in this case, all years were omitted.
        Click image for larger version

Name:	Captura de tela 2025-07-14 112549.png
Views:	1
Size:	16.7 KB
ID:	1779830

        Comment


        • #5
          So only 33 firms appear in every year, and there are many firms that appear less than half the time. csdid is inefficient in the unbalanced case because a time period can be used only if the one it is paired with has data. The regression-based estimator computed in jwdid uses the maximum amount of information. You can use it to obtain a "lags only" estimator, which can be more efficient, or a "leads and lags" estimator with the "never" option. The latter is comparable to Callway-Sant'Anna.

          If you show your csdid command and output I can show you the comparable jwdid command.

          Comment


          • #6

            Thank you again, Professor. Given this particularity of the sample, you are absolutely right. I will search jwdid further. I am currently running CSDID as follows: "csdid depvar(INV) controls (L1.LOGASSET ... L1.AGE), ivar(firm_id) time(year) gvar(year_treat) method(drimp). My sample also has a particularity that cannot be analyzed by CSDID: a country where the data have always been treated. I will check with jwdid to see if I can use this country as an alternative control for the country that is never treated. Your help is greatly enriching the research.

            Comment


            • #7
              Hi Professor Wooldriedge,

              I studied and ran the model with jwdid, and the results were much better, even without the control variables.
              However, when using the control variables, I was unable to calculate the average effect of the treatment on the treated
              (using the estat simple, estat time, estat group, or estat event commands).
              Is it possible to observe the ATT using the control variables in this model?

              And how can I test the parallel trends with jwdid.

              Thank you very much!

              Comment

              Working...
              X