Hi All,
I face a problem when I want to check the estat trendplots there is an issue estat trendplots requires at least two pre-intervention time periods. How do I solve it?
I have two pre intervention time periods June 2022 and Nov 2022 and one time post intervention June 2023
Here is the code that I use for my DiD
xtdidregress (revenue) (did), group(idbanksampah) time(bulan)
Treatment and time information
Time variable: bulan
Control: did = 0
Treatment: did = 1
-----------------------------------
| Control Treatment
-------------+---------------------
Group |
idbanksampah | 40 40
-------------+---------------------
Time |
Minimum | 1 2
Maximum | 1 2
-----------------------------------
Difference-in-differences regression Number of obs = 240
Data type: Longitudinal
(Std. err. adjusted for 80 clusters in idbanksampah)
------------------------------------------------------------------------------
| Robust
revenue | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
did |
(1 vs 0) | 407319.3 176161.3 2.31 0.023 56678.99 757959.7
------------------------------------------------------------------------------
Note: ATET estimate adjusted for panel effects and time effects.
I face a problem when I want to check the estat trendplots there is an issue estat trendplots requires at least two pre-intervention time periods. How do I solve it?
I have two pre intervention time periods June 2022 and Nov 2022 and one time post intervention June 2023
Here is the code that I use for my DiD
xtdidregress (revenue) (did), group(idbanksampah) time(bulan)
Treatment and time information
Time variable: bulan
Control: did = 0
Treatment: did = 1
-----------------------------------
| Control Treatment
-------------+---------------------
Group |
idbanksampah | 40 40
-------------+---------------------
Time |
Minimum | 1 2
Maximum | 1 2
-----------------------------------
Difference-in-differences regression Number of obs = 240
Data type: Longitudinal
(Std. err. adjusted for 80 clusters in idbanksampah)
------------------------------------------------------------------------------
| Robust
revenue | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ATET |
did |
(1 vs 0) | 407319.3 176161.3 2.31 0.023 56678.99 757959.7
------------------------------------------------------------------------------
Note: ATET estimate adjusted for panel effects and time effects.
Comment