I am attempting to use difference-in-difference estimation to measure the effect of new machines on appointments at a hospital. These new machines allow doctors to see more patients.
I have data from 2000-2015 by doctor and year. Hospital A (my treatment group) received 10 new machines in 2012, 12 in 2013, and 15 in 2014. Hospital B (my control group) received no new machines.
I would like to isolate the effect of having all 37 of the machines on appointments (but I am open to suggestions if I should be doing something else). If I use 2012 to 2015 as the time binary then I am underestimating the effect of all the machines. If I use 2014 and 2015 then I am comparing 37 machines to zero machines (before 2012), 10 machines (2012), and 22 machines (2014).
Besides dropping data from 2012 and 2013 is there a way to estimate these effects?
I have data from 2000-2015 by doctor and year. Hospital A (my treatment group) received 10 new machines in 2012, 12 in 2013, and 15 in 2014. Hospital B (my control group) received no new machines.
I would like to isolate the effect of having all 37 of the machines on appointments (but I am open to suggestions if I should be doing something else). If I use 2012 to 2015 as the time binary then I am underestimating the effect of all the machines. If I use 2014 and 2015 then I am comparing 37 machines to zero machines (before 2012), 10 machines (2012), and 22 machines (2014).
Besides dropping data from 2012 and 2013 is there a way to estimate these effects?
Code:
collapse(sum) appointments, by(date hospital) generate time = (date >= date("2012", "Y")) generate treated = (hospital=="A") reg appointments time##treated
Date | Doctor | Hospital | Appointments | Treated | Time |
2010 | 0001 | A | 20 | 1 | 0 |
2010 | 0002 | A | 11 | 1 | 0 |
2010 | 0003 | B | 51 | 0 | 0 |
2010 | 0004 | B | 7 | 0 | 0 |
2011 | 0001 | A | 22 | 1 | 0 |
2011 | 0002 | A | 14 | 1 | 0 |
2011 | 0003 | B | 42 | 0 | 0 |
2011 | 0004 | B | 5 | 0 | 0 |
2014 | 0001 | A | 26 | 1 | 1 |
2014 | 0002 | A | 17 | 1 | 1 |
2014 | 0003 | B | 60 | 0 | 1 |
2014 | 0004 | B | 9 | 0 | 1 |
Comment