Suppose you have a list of hospitals with patients nested in the hospital. You observe each hospital multiple times over a period of time but with different patients in each period. The variable of interest varies within the hospitals.
Since the same hospital is observed multiple times and the variable of interest varies within hospital it would be possible to do a within-hospital transformation. As far as i am concerned this could be done in two ways in Stata
reg dependent_variable independent_variable i.hospital
or
xtset hospital
xtreg dependent_variable independent_variable, fe
Would these two specifications produce the same results?
In a panel data were we observe the same individual over time including a dummy for each individual (LSDV) produces the same results as FE. But for such a data set it is only possible to include a dummy for each individual if you observe the same individual more than once over time. In a specification as the one above where I seek to control for a hospital fixed effect. However, If we just observed a cross-section of hospitals (and thus not observed the same hospital more than once) it would still be possible to include a dummy for each hospital in a regression.
How then does a dummy for each hospital control for fixed effects when we observe the same hospital multiple times compared to a cross-section of hospitals with a dummy for each hospital?
Best regards,
Jonathan
Since the same hospital is observed multiple times and the variable of interest varies within hospital it would be possible to do a within-hospital transformation. As far as i am concerned this could be done in two ways in Stata
reg dependent_variable independent_variable i.hospital
or
xtset hospital
xtreg dependent_variable independent_variable, fe
Would these two specifications produce the same results?
In a panel data were we observe the same individual over time including a dummy for each individual (LSDV) produces the same results as FE. But for such a data set it is only possible to include a dummy for each individual if you observe the same individual more than once over time. In a specification as the one above where I seek to control for a hospital fixed effect. However, If we just observed a cross-section of hospitals (and thus not observed the same hospital more than once) it would still be possible to include a dummy for each hospital in a regression.
How then does a dummy for each hospital control for fixed effects when we observe the same hospital multiple times compared to a cross-section of hospitals with a dummy for each hospital?
Best regards,
Jonathan
Comment