Announcement

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

  • Diff in diff for two treatment groups and control, plust to control for covariates

    Dear All,

    I am estimated the ETA for an RCT project with two interventions, however, I can find the right model specification where I could include both treatments in the same regression with Diff in diff.

    I using the command:

    reg y time##treated, r

    When I added an additional interaction for treated 2, both are omitted in the output. the variables are defined as T1=1 if treatment 1, =0 if control, and .= for T2; whereas T2=1 if T2, =0 if control and .=T1. Could it be that given the missings are omitted, if so, how could you create the var for each group that specifies for eg. T1, control but not T2?

    Second, how could you cluster the covariates at household level to control for those observables that may influence the outcome?

    Third, what would be the right command for the graph that could give you the impact between the control and treatment?

    It would be more than helpful if anybody could answer those questions.

    Thank you!

  • #2
    Your specification of the treatment is incorrect and that is what is causing your problem. What you really need is a single variable treatment coded 0 for control, 1 for treatment1 and 2 for treatment2. Then you just do

    Code:
    regress y i.time##i.treatment // PERHAPS OTHER VARIABLES, OPTIONS
    You do not say enough about your data for anyone to answer your second question about household level variables.

    As for your third question, there are several ways you can do this. My personal preference would probably be:

    Code:
    margins time#treatment
    marginsplot
    Note that the -marginsplot- command accepts most -graph twoway- options so you can customize this to your liking. Also, if this version of the code produces a graph with the variable you want on the x-axis in the legend and vice versa, you can flip that by adding the -xdimension()- option to the -marginsplot- command.

    Comment

    Working...
    X