I want to create this DID model: π¦ππ‘ = πΌ + ππ + ππ‘ + π½π‘π·π + πππ‘,
Where π¦ππ‘ is the Saidin Index for hospital π in year π‘, ππ and ππ‘ are fixed effects for the hospital and year, respectively, π·π is a treatment status dummy, and πππ‘ is a hospital-year specific error term. π½π‘ is the treatment effect specific to year π‘, and is allowed to vary over time.
Note that the treatment is βonβ for treated hospitals in all years of the panel.
Output: Create a separate dataset containing your estimates for π½π‘, 95% confidence interval bounds for π½π‘, as well as the mean Saidin Index for the control group and treatment group in each year. This dataset should have one observation per year. Name the variable containing your estimates for π½π‘ in each year tr_effect, the upper CI bound tr_hi, the lower CI bound tr_lo, the control group mean cr_mean, and the treatment group mean tr_mean. Hints: 1) When you estimate this model, it will be convenient to let 2004, the year of treatment, be the base (βomittedβ) category. Framed different, all point estimates should be normalized to zero in 2004. Think about what the coefficients estimated for the periods before and after 2004 represent to see why this is.
Dataset looks like this
TIA.
Where π¦ππ‘ is the Saidin Index for hospital π in year π‘, ππ and ππ‘ are fixed effects for the hospital and year, respectively, π·π is a treatment status dummy, and πππ‘ is a hospital-year specific error term. π½π‘ is the treatment effect specific to year π‘, and is allowed to vary over time.
Note that the treatment is βonβ for treated hospitals in all years of the panel.
Output: Create a separate dataset containing your estimates for π½π‘, 95% confidence interval bounds for π½π‘, as well as the mean Saidin Index for the control group and treatment group in each year. This dataset should have one observation per year. Name the variable containing your estimates for π½π‘ in each year tr_effect, the upper CI bound tr_hi, the lower CI bound tr_lo, the control group mean cr_mean, and the treatment group mean tr_mean. Hints: 1) When you estimate this model, it will be convenient to let 2004, the year of treatment, be the base (βomittedβ) category. Framed different, all point estimates should be normalized to zero in 2004. Think about what the coefficients estimated for the periods before and after 2004 represent to see why this is.
Dataset looks like this
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str6 prov_id int year byte(tech_num tau teach) int beds byte(nonprof govt treat _merge) float(N_t a_kt saidin) "11z111" 2001 17 1 0 35 0 1 0 3 1305 .0934866 .53716475 "11z111" 2001 2 0 0 35 0 1 0 3 1305 1 .53716475 "11z111" 2001 28 0 0 35 0 1 0 3 1305 1 .53716475 "11z111" 2001 7 0 0 35 0 1 0 3 1305 .27969348 .53716475 end label values _merge _merge label def _merge 3 "Matched (3)", modify
Comment