I am trying to understand the type of data I have to do a DiD analysis. I am evaluating a new policy aimed at decreasing the rate of elderly illness for those undergoing heart surgery in hospitals. The intervention is deployed in all urban region hospitals in the country on the 1st of March 2018. This data is on weekly illness rates for the elderly from March 2016 till March 2019. Then I have a collection of similar data from the rural region hospitals. Again it is weekly data on illness rates for the elderly between March 2016 and March 2019. I want to apply a DiD design to this.
For this I want to draw a coefplot for the regression results by treatment. I tried the following:
uietly reg illness b22233.date##treated if inrange(date,td(14nov2020),td(30nov2020)) |(treated==1),robust
estimates store Treated
quietly reg illness b22233.date##treated if inrange(date,td(14nov2020),td(30nov2020)) |(treated==0),robust
estimates store Untreated
Then I tried to plots:
coefplot Treated Untreated, vertical drop(_cons) xlabel(1 "14 Nov 20" 25 "18 Nov 20" 50 "22 Nov 20" 75 "26 Nov 20" 100 "30 Nov 20", angle(50))
and
coefplot Treated Untreated, vertical drop(_cons) keep(*.t) xlabel(1 "14 Nov 20" 25 "18 Nov 20" 50 "22 Nov 20" 75 "26 Nov 20" 100 "30 Nov 20", angle(50))
Both gave me different results but don't seem to be exactly correct. Any thoughts??
For this I want to draw a coefplot for the regression results by treatment. I tried the following:
uietly reg illness b22233.date##treated if inrange(date,td(14nov2020),td(30nov2020)) |(treated==1),robust
estimates store Treated
quietly reg illness b22233.date##treated if inrange(date,td(14nov2020),td(30nov2020)) |(treated==0),robust
estimates store Untreated
Then I tried to plots:
coefplot Treated Untreated, vertical drop(_cons) xlabel(1 "14 Nov 20" 25 "18 Nov 20" 50 "22 Nov 20" 75 "26 Nov 20" 100 "30 Nov 20", angle(50))
and
coefplot Treated Untreated, vertical drop(_cons) keep(*.t) xlabel(1 "14 Nov 20" 25 "18 Nov 20" 50 "22 Nov 20" 75 "26 Nov 20" 100 "30 Nov 20", angle(50))
Both gave me different results but don't seem to be exactly correct. Any thoughts??
