Announcement

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

  • csdid and state-year FE

    Dear Statalisters,

    My research examines the effect of a support program for districts on district economic outcomes. I have a panel data over 4 time points, including 2010, 2013, 2016 and 2019. I plan to use csdid since there is variation in treatment timing. I have 3 questions.

    1, I want to include state-year FE. From this post https://www.statalist.org/forums/for...fects-in-csdid, it is said that including this kind of FE would not work. I don't understand why.
    If I included state-year FE, the estimates become much more significant than excluding state-year FE.
    egen state_year=group(state year)
    tabulate state_year, generate(state_year_fix)
    egen group_var = csgvar(sup_pro), tvar(year) ivar(district)
    csdid econ_gr state_year_fix*, district time(year) gvar(group_var) method(dripw) cluster(state)

    (sup_pro is the treatment var, equal 1 if the district started to participate in the support program in year t.)
    Is this correct to include state-year FE like this? Are my codes to include state-year FE correct?

    2, Are 4 time points too few for csdid?

    3, The support program actually started from 2007. However, I only got data from 2010. So, I drop districts which started to participate in the support program before 2011. Is this way of removing always-treated groups correct? Or I should keep all the observations in the data and leave it to stata to ignore those always-treated groups?

    Many thanks.

  • #2
    Daisy: The issue is whether overlap fails, and that is more likely when you have state x year fixed effects. Essentially, you need to ensure there are control units in every state x year combination. I assume this happens if you actually get estimates from csdid. By the way, I think you'll get the same estimates just including state FEs because all controls effectively are interacted with all time dummies when using csdid. In fact, csdid does not use time-varying controls. It uses only the first period value, which is the same as using just the state FEs.

    As a robustness check, you can try jwdid, which also allows staggered entry and is based on flexible regression. If you just include the state dummies then these get included interacted with the year dummies:

    Code:
    jwdid econ_gr_state i.state, ivar(id) tvar(year) gvar(first_treat)
    where first_treat is zero for untreated districts and equals the first year of treatment for treated districts.

    And, yes, it is easiest to omit the units already treated when your data sample starts.

    Comment


    • #3
      Thanks alot, Jeff.
      I am sorry for my late reply. I try with your suggestion. It takes me time because both csdid and jwdid are new to me.

      When I include i.state, Stata omits all state dummies. But if I mannually create state dummies and add them, the omission does not happen. Is it the problem of csdid?
      csdid econ_gr state_year_fix*, district time(year) gvar(group_var) method(dripw) cluster(state)
      csdid econ_gr state_fix*, district time(year) gvar(group_var) method(dripw) cluster(state)

      csdid with state_year_fix* i.state produces a much more significant estimate (but smaller) than using csdid with just state_fix*
      I don't know which one is more precise to claim?

      jwdid does allow to use i.state. The estimate similar to the one from using csdid, but more significant.

      I cannot use jwdid with state_year_fix*, because of the limitation of my Stata version in working with large matrices.
      Do you have any kind suggestion for this?

      Comment


      • #4
        Hi Daisy,

        Some answers (if late)

        First: Im assuming you have repeated crossection.

        Some answers

        1, I want to include state-year FE. From this post https://www.statalist.org/forums/for...fects-in-csdid, it is said that including this kind of FE would not work. I don't understand why.

        Short version of the answer.

        - CSDID runs a series of regressions for 2x2 combinations (cohort vs control and pre-treatment and post treatment data).
        for this 2x2, adding year fixed effects makes little sense, because in Repeated crossection, models for each year in the "control" and "cohort" group data. Thus year Fixed effects makes no sense (dummy does not change)
        - For Balance, State fixed effects only makes sense if for every State, there is a treated and a control group. If not, the models for control and cohort will be different and not comparable. Predictions will not make sense

        2, Are 4 time points too few for csdid?

        No, CSDID uses only 2 points in time for ATTs.

        3, The support program actually started from 2007. However, I only got data from 2010. So, I drop districts which started to participate in the support program before 2011. Is this way of removing always-treated groups correct? Or I should keep all the observations in the data and leave it to stata to ignore those always-treated groups?

        Yes, that is preferred

        4. its because State is with ID that all State dummies are dropped

        HTH
        F

        Comment


        • #5
          Thanks so much, Fernando.

          Comment


          • #6
            Hi @FernandoRios,
            I have recently worked with csdid2. The result from "event plot" using csdid2 package is a bit different from the one using csdid package.
            I have 2 questions.

            1. The event-plot figure using csdid looks a bit like there had already been some pre-trends even though insignificant (positive estimates for pre periods). The event-plot figure using csdid2 is more similar to the pre-trend test result; it looks quite clear that there is no pre-trend. (The results from estat pretrend using both csdid and csdid2 reject pre-trend.)
            Why there is this difference in event-plot figure between csdid and csdid2, and difference between the estat pretrend and event-plot?

            2. Since my sample covers 4 years (2010, 2013, 2016 and 2019), in event-plot figure by csdid, there are 5 time points (-6, -3, 0, 3, 6). But in the figure by csdid2, there are 6 time points (-9, -6, -3, 0, 3, 6). However, in the figure by csdid2, the estimate for time -3 is blank.
            Why there is difference in display of number of time points and why the estimate for time -3 in the figure by csdid2 is blank?

            Many thanks.

            Comment


            • #7
              short answer
              csdid uses short pretrend ATTs
              csdid2 uses long differences

              csdid, long2 will be the same as csdid2 default

              this will also explain the "blank" number

              Comment


              • #8
                Thanks alot, Fernando

                Comment


                • #9
                  Dear @FernandoRios,

                  I have a question about comparision for pre-treatment periods.
                  csdid econ_gr , district time(year) gvar(group_var) method(dripw) cluster(district) notyet long2 agg(event)
                  My data covers only 4 years 2010, 2013, 2016 and 2019. When I plot the estimates after running csdid long2, the figure shows estimates for t-9, t-6, t=0, t+3, and t+6. However, the treatments started in 2013. That means there is only one pre-treatment period (which is t-3 used as reference period).
                  If t-9 means the comparision between 2010 (t-3, the reference period) and 2004 (9 years before the treatment begins) and t-6 means the comparison between 2010 and 2007, my data does not cover 2004 and 2007. I am abit confused here.
                  I wonder what does t-9 and t-6 mean?

                  Many thanks.

                  Comment


                  • #10
                    couple of things
                    1) -District- seems to be a typo. it would not be used at all on your estimation
                    2) not all cohorts will have the corresponding T+s and T-s periods
                    for the treated in 2013, there is data for T-3, T T+3 and T+6
                    but for those treated in 2019 there are T-9 , T-6 T-3 and T, but not Post treatment

                    The summary you get using estat event considers all possible event periods, not constraining to common information.
                    HTH

                    Comment


                    • #11
                      Thanks alot, Fernando

                      Comment

                      Working...
                      X