Consider the following panel data set with 3000 units and 10 time-periods.
Here, I found something that are not understandable.
I wanted to check whether the standard error for the intercept estimator works well, so, I have first calculated the standard deviation of the intercept estimator.
That is, the value in the _b_cons row and Std.dev. column is the the standard deviation.
In my case, the result is about 0.01934.
But, the result from the xtreg command is far from the result above.
The standard errors are much smaller than the standard deviation. But, I have no idea why it happens.
Code:
. clear all . version 18 . program DGP_fe . local N = 3000 . local T = 10 . local NT = `N' * `T' . set obs `NT' . generate pid = ceil(_n/`T') . generate tid = _n - `T' * (pid - 1) . generate alp = . . bysort pid: replace alp = cond(_n == 1, rnormal(), alp[1]) . generate x = rnormal() . generate eps = rnormal() . generate D = rnormal() > 0 . generate y = 1 + 1 * x + alp + eps . end . DGP_fe
I wanted to check whether the standard error for the intercept estimator works well, so, I have first calculated the standard deviation of the intercept estimator.
Code:
. program bet_fe, rclass . drop _all . DGP_fe . quietly xtset pid tid . quietly xtreg y x, fe . end . simulate _b, reps(1000) saving(bet_fe, replace): bet_fe . summarize
In my case, the result is about 0.01934.
But, the result from the xtreg command is far from the result above.
Code:
. DGP_fe . xtset pid tid . xtreg y x, fe . xtreg y x, fe vce(cl pid)
Comment