Announcement

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

  • Diff-in-diff with controls

    Hi Statalist!

    I am currently learning how to use Stata, so this might be a bit basic. But I am using a diff-in-diff approach to see the effect on my dependent variable from being part of this particular welfare program. My dependent variable is a dummy (meaning that all the variables in the regression below are dummies). My question is how it works if I want to add some controls in the regression? Do I just add them to the code I have now, lining up after the interaction variable?

    reg dependentvar posttreatment treated interaction, vce(cluster district)

    Also, when I perform this regression as it is stated above, the r2 is extremely low (which is expected). But still, I just wonder out of curiosity, to what extent should the r2 coefficient be considered when it is a diff-in-diff regression and all included varaibles are dummies?

    Thank you.

  • #2
    Emma:
    welcome to the list.
    Some remarks about your post:
    - as far as interaction and factor variables at large are concerned, please take a look at -help fvvarlist-;
    - i'm not clear about the sort of seemingly mandatory relationship you state
    My dependent variable is a dummy (meaning that all the variables in the regression below are dummies)
    ;
    - including some controls in the right-hand side of your equation takes nothing else more that this:
    Code:
    reg dependentvar posttreatment treated interaction <controls>, vce(cluster district)
    ;
    ​- as far as the magnitude of your r2 is concerned, it is difficult (for me, at least) to reply without seeing the results of your Stata session (that you can easily paste via Code delimiters; please, see FAQ on this topic. Thanks).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo for your clear answer regarding the controls.

      You are of course right about the fact that there is no mandatory relationship. What I was trying to express there before was just that all the variables in the code that I posted are dummies, although it definitely was formulated in a pretty unclear way.

      But thanks again for the advice!

      Emma

      Comment


      • #4
        Emma:
        thanks a lot for your clarification.
        Just out of curiosity: no continuous variables are included amomgst your predictors?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          That is correct, all variables in the line posted again below are dummies. As far as I have understood it, that setup should be okay, at least when the only interpretation one wants to make regarding the results is whether there is a significant effect and if so, if this effect is positive or negative. Thus, not making any interpretations of size or magnitude.
          dependentvar posttreatment treated interaction Thanks again for the answer about the controls.

          Best regards, Emma

          Comment

          Working...
          X