Dear Statalisters,

I am estimating a difference-in-difference with fixed effects. I use the nostimcheck to calculate the predictive margins and marginal effects. However, the difference between the control and treatment group in the first time period (98) is zero in all my models. I cannot share my original dataset, but I have made an example dataset to illustrate the issue (note: time is a standardized time variable that ranges from 98 to 103):
Code:
clear
input float(id time treatment salary)
14 100 0 20000
 7 100 0 20000
13 102 0 23000
13  98 0 23000
 9 102 0 21000
10 101 0 20000
10 102 0 20000
10 103 0 20000
14  99 0 22000
10  98 0 21000
14 101 0 20000
 7  98 0 20000
13 100 0 23000
 6  99 0 24000
 9  98 0 21000
 8 103 0 20000
10  99 0 21000
 8 101 0 20000
 8 100 0 20000
 8  99 0 20000
 7 102 0 20000
 7 101 0 20000
 6 102 0 24000
13  99 0 23000
 6 101 0 24000
 7  99 0 20000
13 103 0 22000
 9  99 0 21000
 9 100 0 21000
14 103 0 20000
 8 102 0 20000
 9 103 0 21000
14  98 0 20000
 8  98 0 20000
13 101 0 23000
 6 100 0 24000
14 102 0 20000
 6  98 0 24000
10 100 0 20000
 7 103 0 20000
 9 101 0 21000
 6 103 0 24000
 3 102 1 24000
 1 103 1 15000
12  98 1 20000
 4 100 1 15000
 5  99 1 20000
 2 100 1 17000
12  99 1 20000
12 101 1 20000
 3 103 1 24000
 3  99 1 21000
 1 101 1 15000
 2  99 1 20000
 4 102 1 15000
 1 102 1 15000
 3 100 1 24000
 2 103 1 17000
 2 101 1 17000
 2  98 1 20000
 1  99 1 20000
 1  98 1 20000
 5 102 1 22000
 1 100 1 15000
 5  98 1 20000
 5 101 1 22000
12 100 1 20000
 4 101 1 15000
 3  98 1 21000
 3 101 1 24000
 4  99 1 19000
 2 102 1 17000
 4 103 1 15000
 4  98 1 19000
12 102 1 19000
 5 100 1 21000
12 103 1 19000
 5 103 1 22000
end

Here is some code for illustration:
Code:
xtset id time
xtreg salary i.treatment##i.time, fe cluster(id)
margins treatment, at(time =(98 99 100 101 102 103)) noestimcheck
                    *_at#treatment
                    *1 0  |     20692.31
                    *1 1  |     20692.31
marginsplot
Same result in time = 98 when estimating the marginal effects
Code:
margins, dydx(treatment) at(time =(98 99 100 101 102 103)) noestimcheck
                    *1.treatment
                    *_at
                    * 1  |     0
marginsplot
Can anybody explain what is happening in the first time period? This might be problematic for my case because I would like to assess the parallel trend.


Gustav