Announcement

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

  • how to make a graph showing staggared DID treamtment by showing the treated firms, newly treated and control firms

    Dear members

    I am using the staggered DID to assess the impact of policy mandate on a firm outcome and would like to graph the number of observations on the Y-axis and the years on the X-axis to show the following: the number of firms that have been treated since the begging, the newly treated firms during the sample period and the control firms. Note that the treated firm received one and zero for control firms.
    here is an example of my data:
    thanks in advance for your kinder help.
    clear
    input int Year float(treatedfirm firm_id treatedxmandate)
    2016 0 4 0
    2013 0 7 0
    2015 0 6 0
    2015 0 7 0
    2017 0 4 0
    2017 0 5 0
    2019 0 8 0
    2019 0 5 0
    2014 0 7 0
    2018 0 4 0
    2014 0 4 0
    2010 0 7 0
    2020 0 5 0
    2017 0 7 0
    2016 0 5 0
    2018 0 5 0
    2018 0 6 0
    2019 0 6 0
    2018 0 8 0
    2015 0 4 0
    2015 0 5 0
    2016 0 7 0
    2016 1 2853 0
    2019 0 7 0
    2015 1 2853 0
    2018 0 7 0
    2016 0 6 0
    2019 0 4 0
    2014 1 2853 0
    2017 0 6 0
    2013 1 81 1
    2016 1 81 1
    2007 1 3091 1
    2019 1 81 1
    2010 1 79 1
    2014 1 154 1
    2019 1 99 1
    2019 1 110 1
    2016 1 48 1
    2019 1 154 1
    2019 1 1591 1
    2014 1 153 1
    2018 1 42 1
    2007 1 114 1
    2020 1 133 1
    2005 1 96 1
    2019 1 128 1
    2016 1 80 1
    2015 1 155 1
    2018 1 51 1
    2013 1 56 1
    2007 1 285 1
    2016 1 123 1
    2014 1 68 1
    2009 1 96 1
    2020 1 87 1
    2014 1 47 1
    2012 1 49 1
Working...
X