Announcement

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

  • didregress, estat trendplots error message 'treatment assignment times vary'

    Hi,

    I am trying to investigate the effect of an earthquake on the likelihood of someone owning a bank account.

    I am using Stata17 and the didregress command with the following code:
    didregress (BankAccount) (Affected), group(region) time(hv008)

    Affected is a dummy variable for whether a region has been hit by the earthquake or not.
    hv008 is a time variable, representing months, but the numbers themselves seem random: they run from 1237 (representing January 2003) to 1307 (representing November 2008).

    The earthquake hit in the period 1293 (that is the first period for which Affected=1).

    The output I get is:

    Number of groups and treatment time

    Time variable: hv008
    Control: Affected = 0
    Treatment: Affected = 1
    -----------------------------------
    | Control Treatment
    -------------+---------------------
    Group |
    region | 22 3
    -------------+---------------------
    Time |
    Minimum | 1261 1293
    Maximum | 1263 1294
    -----------------------------------

    Difference-in-differences regression Number of obs = 142,646
    Data type: Repeated cross-sectional

    (Std. err. adjusted for 25 clusters in hv024)
    ------------------------------------------------------------------------------
    | Robust
    hv247 | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    ATET |
    Affected |
    (1 vs 0) | .0545509 .0328161 1.66 0.109 -.0131782 .1222801
    ------------------------------------------------------------------------------
    Note: ATET estimate adjusted for group effects and time effects.

    . estat trendplots
    treatment assignment times vary; not allowed with estat trendplots
    r(459);

    Please can someone help find a way to avoid this error message? The top table implies treatment times vary although this is because there is no data for one of the affected regions for the period 1293 (although there is data for before and after the shock).
    I would be really grateful for any help!

    Thank you in advance.

  • #2
    Hello! did you find the solution? I have same issue

    Comment

    Working...
    X