Announcement

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

  • Simple parallel trends for Difference in Difference

    Hello,
    I am doing a very basic Difference in Difference. I get my results for the DD fine, but for my paper I need to use a graph to show the same parallel trends. my treated country is Georgia, my control country is Armenia, my data set has the years from 1997 to 2008, with time by quarter. My treatment period starts in 2003.
    my basic code is as follows.

    gen time = (Year>2003.3) & !missing(Year)
    egen countrynum = group(Country)
    gen treated =(countrynum<2) & !missing(countrynum)
    gen did = time*treated
    reg FDI time treated did

    my question is how can I go about creating the graph for the DD to show parallel trends?
    Thank you so much in advance I have been stuck on this for days!



  • #2
    Something like this:

    Code:
    collapse FDI, by(treated Year)
    sepscatter FDI Year, separate(treated)
    -sepscatter- is by Nick Cox and can be obtained from SSC. If you prefer line graphs to scatter plots, -sepscatter- supports the -recast()- option (and many other twoway options that will give you detailed control over the appearance of the graph.)

    Comment

    Working...
    X