Announcement

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

  • state FE in csdid

    I am evaluating a state-level policy with a staggered rollout. After the policy goes into effect there are individuals within each state who benefit from the policy (treated) and who are not eligible to benefit from the policy (controls). We have a continuous time variable (cont_quarter) and then I coded a policy implementation quarter (policy_imp_qt) to be used in the gvar option. Policy_imp_qt is set to 0 for ineligible individuals.

    Because our time variable is pretty granular, almost every state in our dataset has a unique policy implementation quarter (see table below). The exceptions are two states, RI and VA, which implemented the policy in quarter 21.

    Code:
               |                                      policy_imp_qt
         state |         0         10         17         21         33         35         37         40 |     Total
    -----------+----------------------------------------------------------------------------------------+----------
            AZ |     6,582     11,398          0          0          0          0          0          0 |    17,980 
            GA |    22,934          0          0          0          0          0      7,938          0 |    30,872 
            HI |        44          0          0          0          0         47          0          0 |        91 
            KS |     1,673          0          0          0      3,008          0          0          0 |     4,681 
            ME |       617          0        378          0          0          0          0          0 |       995 
            OK |     1,487          0          0          0          0          0          0      3,098 |     4,585 
            RI |     6,368          0          0      5,185          0          0          0          0 |    11,553 
            VA |     5,810          0          0     20,907          0          0          0          0 |    26,717 
    -----------+----------------------------------------------------------------------------------------+----------
         Total |    45,515     11,398        378     26,092      3,008         47      7,938      3,098 |    97,474
    Because we are comparing the change in outcomes for eligible people in states that implement the policy to the change in outcomes for ineligible people in the *same* states, I originally planned to include state fixed effects. However, when I run the code below with state FE I get 0 estimates throughout.
    Code:
    csdid y i.STATE, time(cont_quart) gvar(policy_imp_qt) method(dripw) cluster(patid) long2
    I am guessing it has to do with the fact that policy implementation quarter in the majority of the cases is collinear with state? But what about the two states that have the same policy implementation quarter? I considered running a regression with no state FE but just including a dummy for either RI/VA. But I am not sure if I am interpreting the problem and the setup correctly. I would appreciate any comments and suggestions. Thank you in advance!

  • #2
    You cant do that. It would violate overlapping assumption.
    In general, you have to think the following.
    if you take a single 2x2 DID , would it make sense to control for variable X? as in , will there be observations in all pre-post treated control group for that particular variable?
    if yes, then you can do it
    if not, then you shouldnt

    Comment


    • #3
      Thank you, Fernando. I appreciate the quick response!

      Ideally, I want to compare treated and never treated individuals within the SAME state. Because every state in our data has treated (policy eligible) and never treated (policy ineligible) individuals in every pre and post period, my thinking was I should be able to include state as a control. Otherwise, I think I would be comparing something like treated individuals in AZ to control individuals in GA instead of treated in AZ to controls in AZ. I played around with the code some more and discovered that when I run the code with state dummies coded as i.STATE
      Code:
      csdid y i.STATE, time(cont_quart) gvar(policy_imp_qt) method(dripw) cluster(patid) long2
      I get no estimates (xxxxx and all the 2 by 2 blocks have 0s)

      But when I code the state dummies by hand and run:
      Code:
      csdid y AZ GA HI KS ME OK RI, time(cont_quart) gvar(policy_imp_qt) method(dripw) cluster(patid) long2
      I get output that is in line with what I would expect. Any idea why? Thank you!

      Comment


      • #4
        I’ve verified, with one of my own data sets, that csdid doesn’t allow things like state FEs. But I don’t really understand why. With control and treated units in each state during treated periods I don’t see the overlap problem. And Olesya’s work around seems to confirm that it’s not an overlap problem.

        Comment


        • #5
          I’ve verified, with one of my own data sets, that csdid doesn’t allow things like state FEs. But I don’t really understand why. With control and treated units in each state during treated periods I don’t see the overlap problem. And Olesya’s work around seems to confirm that it’s not an overlap problem.

          Comment


          • #6
            I agree with Jeff, but a thought I have is: why do you need csdid if you can compare treated and control in the same state in every period? For example, you could use state by quarter effects, treatment group by quarter effects, and individual effects? If I understand correctly, you would then have zero bad comparisons. Feel free to ignore this if I have it wrong, though.

            Comment


            • #7
              I agree with Alecia. If you use jwdid with state FEs, you’ll get a separate effect by cohort, state, and quarter along with and average effect by cohort and quarter. These are easily aggregated into an event study plot.

              Comment


              • #8
                Finally to chime in.
                As you point out Alicia, and Jeff reiterated, csdid and jwdid both do the same. they "handle" the design and manipulation and aggregation.
                do you need them? no
                You can get the same results, but as the numbers groups periods increase, it just gets more difficult to track everything, which is why I wrote those commands.
                HTH

                Comment

                Working...
                X