Hello,

I am trying to do a diff in diff approach where my regression code looks like this

Code:
mi estimate, esampvaryok: reg job_hours treatment time i.time#i.treatment, robust
Treatment is defined as

Code:
gen treatment=0 if (expectation==2 & f.gift_received==2 & gift_total < 50000000) | (l.expectation==2 & gift_received==2 & gift_total < 50000000) 

replace treatment=1 if (expectation==2 & f.gift_received==1 & gift_total < 50000000) | (l.expectation==2 & gift_received==1 & gift_total < 50000000)
and time is a binary variable for the two time points.

My output looks as follows

Code:
Multiple-imputation estimates                     Imputations     =          5
Linear regression                                 Number of obs   =         55
                                                  Average RVI     =     0.1495
                                                  Largest FMI     =     0.3396
                                                  Complete DF     =         51
DF adjustment:   Small sample                     DF:     min     =      19.29
                                                          avg     =      37.33
                                                          max     =      47.65
Model F test:       Equal FMI                     F(   3,   38.8) =       1.62
Within VCE type:       Robust                     Prob > F        =     0.1996

--------------------------------------------------------------------------------
     job_hours |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
     treatment |  -7.653846   7.472867    -1.02   0.318    -23.27896    7.971272
          time |   -5.29398   3.226253    -1.64   0.108    -11.78518    1.197221
               |
time#treatment |
          0 1  |   3.972687   12.99843     0.31   0.762     -22.3997    30.34508
          1 0  |          0  (omitted)
          1 1  |          0  (omitted)
               |
         _cons |   42.74783   2.208462    19.36   0.000     38.30658    47.18907
--------------------------------------------------------------------------------
However, I want the regression to look like this

job_hours = b0 + b1 * (treated = 1) + b2 * (Time=1) + b3 * interaction+ e_it, where in the interaction both treated and time are = 1

I am unsure how to continue, how would I change the regression to make this happen? mi estimate doesn't seem to allow for "if"