Announcement

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

  • DID assumption testing

    Hi,

    I want to test the did-assumption of pre-treatment parallel trends.

    I have already visually displayed the pre- and post-treatment trends in Stata, but I also want to verify with a regression.
    My main specification is as follows:
    Where I estimate the effects on export from Norway to country j.
    xi: ppml ImportTons gdp_imp gdp_exp TREAT POST DID i.year i.importer i.category, cluster (importer)


    I want to check in Stata that the pre-treatment trends are parallel and I only have one treatment that happens in 2010, and one control group and one treatment group.

    X j,t,p = ß0 +ßt ⋅ YEARt ⋅ TREATj ⋅ pre2010t + year fe + importer fe +product fe + εj,t,p

    So YEAR is a dummy variable for each year, TREAT =1 for the treatment group.

    How do I create this interaction between of year dummies and the treatment indicator in Stata?

    Thank you,

    Olivia

  • #2
    You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    In general, interactions in Stata are most easily done with factor variable notation. So the interaction of year dummies (treating them as dummies not as a continuous variable) and treatment is i.year#i.treatment

    Comment

    Working...
    X