Hi all,

I'm trying to estimate a generalized DID (two periods three groups)'s local average treatment effect. The DID code used was:
Code:
svy: regress OUTCOMEVAR i.time##i.intervention
Could you please confirm whether the following code is correct:

Code:
svy: ivregress 2sls OUTCOMEVAR i.time (i.intervention i.time#i.intervention = i.instrument i.time#i.instrument)
where time is a dummy variable for time, intervention=0/1/2 indicating the allocated treatment and instrument=0/1/2 indicating the actual treatment received.

Also, I'd like to look at heterogenous effects on compliers (i.e. female=0/1). Would the following code make sense?

Code:
svy: ivregress 2sls OUTCOMEVAR i.time i.female i.time#i.female (i.intervention i.intervention#i.female i.time#i.intervention i.time#i.intervention#i.female = i.instrument i.instrument#i.female i.time#i.instrument i.time#i.instrument#i.female)
Thank you