Hello all,
I have a dataset that consist of 181 health facilities that have been randomized in two groups: Treatment (T ) and Control. The randomization was carried out at the health-facility level. Health facilities are nested in 8 health districts (ZS). Information of these health facilities were collected quarterly from 2012 to part of 2017 for 23 quarters. I would like to run a first model that is a time fixed-effects and health districts fixed effects since I cannot do a health facility fixed-effects because my Treatment ( the variable of interest) is time-invariant. Later on, I will interact Quarter and Treatment to see if there are any time treatment effect (second model).
I am confused about how to set up the equation and how to run it in STATA with the right clustering for the first model. My idea for the equation is the following:
Y _it= bT + V_t + X_i, were T is the treatment indicator, X ( if the health facilities is located in rural or urban area) and V_t are the quarter dummies. My question here is how do I include the health districts (ZS) in this Equation. If I add U_i for ZS, it seems wrong because "i" is for health facility.
Second, to run the code in stata, I did the following:
1.xtset facility_id
2. xtreg y T i.Quarter i.ZS, fe vce (cluster ZS). This gives me an error that panels are not nested within clusters. if I cluster with facility_id, the T is omitted (rightly so).
So how do I set it up to get the correct standard errors?
I would appreciate any help to understand how to correctly specify the model and run it in Stata (earlier version)
Thank you very much in advance,
Nono
I have a dataset that consist of 181 health facilities that have been randomized in two groups: Treatment (T ) and Control. The randomization was carried out at the health-facility level. Health facilities are nested in 8 health districts (ZS). Information of these health facilities were collected quarterly from 2012 to part of 2017 for 23 quarters. I would like to run a first model that is a time fixed-effects and health districts fixed effects since I cannot do a health facility fixed-effects because my Treatment ( the variable of interest) is time-invariant. Later on, I will interact Quarter and Treatment to see if there are any time treatment effect (second model).
I am confused about how to set up the equation and how to run it in STATA with the right clustering for the first model. My idea for the equation is the following:
Y _it= bT + V_t + X_i, were T is the treatment indicator, X ( if the health facilities is located in rural or urban area) and V_t are the quarter dummies. My question here is how do I include the health districts (ZS) in this Equation. If I add U_i for ZS, it seems wrong because "i" is for health facility.
Second, to run the code in stata, I did the following:
1.xtset facility_id
2. xtreg y T i.Quarter i.ZS, fe vce (cluster ZS). This gives me an error that panels are not nested within clusters. if I cluster with facility_id, the T is omitted (rightly so).
So how do I set it up to get the correct standard errors?
I would appreciate any help to understand how to correctly specify the model and run it in Stata (earlier version)
Thank you very much in advance,
Nono
Comment