I have a very straightforward question:
Why do these three commands:
produce identical standard errors? The fixed effects take care of the intercept but there could still be heteroskedasticity acting over time, no? Still, publications always say that they use 'robust standard errors clustered at the individual level' in fixed effects panels... I don't understand why both is necessary if the robust option already produces the same results as clustering.
Here an example (please let me know if there is a better way to get an example dataset into Stata, the sysuse data usually does not have two panel dimensions...). This is of course a random dataset but I have the same issue in a very large real world dataset that probably has some heteroskedasticity somewhere (at least 4 dots after the comma some results should change if Stata doesn't do the exact same thing in these three cases...):
Why do these three commands:
Code:
xtreg [formula], fe r xtreg [formula], fe r cluster(id) xtreg [formula], fe vce(cluster id)
Here an example (please let me know if there is a better way to get an example dataset into Stata, the sysuse data usually does not have two panel dimensions...). This is of course a random dataset but I have the same issue in a very large real world dataset that probably has some heteroskedasticity somewhere (at least 4 dots after the comma some results should change if Stata doesn't do the exact same thing in these three cases...):
Code:
set seed 123 set obs 900 gen y= runiform() gen x= rbinomial(1,0.05) gen countvar= _n gen id = 1 if countvar <= 300 replace id = 2 if countvar >300 replace id = 3 if countvar >600 bysort id : gen time = _n replace y = y + countvar if id==1 xtset id time xtreg y x i.time, fe r xtreg y x i.time, fe r cluster(id) xtreg y x i.time, fe vce(cluster id)
Comment