Announcement

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

  • Dif in Dif with controls and fixed effects

    Hello Everyone,

    I'm trying to replicate a Dif in Dif of a paper and my results are similar but not equal to the paper's.
    The paper speciffied that they use controls, and fixed effects. Huber-White robust errors. and a weighted regression.

    So the code I made is the following:


    reg NotWorking treat policy inter gage man head couples level children_tot childrengage childrenlevel gagelevel i.sem i.dpto i.semdpto [pw=pesosem], robust

    like..
    (Y control_group treatment control_variables control_variables_interactions i.fixed_effects_variables i.fixed_effect_variables_interactions [pw=weighted], robust)


    Please, correct me if I'm commiting any mistake.

    Thank you!


  • #2
    It is hard to say anything for sure without knowing the exact details of the original model. But one possibility is that i.semdpto should not be included; a typical DiD includes fixed effects for unit and time, but not their interaction (it has the treatment indicator instead). What do -sem- and -dpto- represent?

    Comment


    • #3
      Thanks for replying.

      I'll cite textually for the paper
      "At and Bj are a full set of semester and state fixed effects. Finally Cjt are state-by-semester effects, introducted to control for state-specific shocks over the period that might be independient of national economic conditions"

      I have a lack in Stata nomenclature.

      Cause my regression have: treatment-variables, control-variables, fixed-effect-variables, interaction-between-variables

      What`s the speciffication difference to include all them in the same regression to control for a DiD reg??

      i don't really know which of this is correctly used by i.

      Comment


      • #4
        I see, there are indeed unit-by-time interactions in your case. The standard way to specify these in Stata is with the "#" operator (type help fvvarlist in Stata):
        Code:
        reg NotWorking treat policy inter gage man head couples level children_tot childrengage childrenlevel gagelevel i.sem i.dpto i.sem#i.dpto [pw=pesosem], robust
        rather than including a "semdpto" variable equal to sem * dpto.

        If you are getting similar but not identical results, a common possibility is that the authors include different control variables (or interactions with those variables). But to help more, I would need a link to the paper in question, an example of your data (see help dataex) and the output of your regression.

        Comment

        Working...
        X