Hello everyone,
I was preparing a little example to show my students how the between estimator is simply an estimator on the averages of the different variables at the panel level, and curiously enough I found that Stata provides close but different in the example I was preparing. Here is the code:
My question is why is there this difference in the estimation of the coefficients? Is this because the panel is unbalanced and when using xtreg, be Stata weights the observations within the panels differently to estimate the panel average? If so, how does it calculate these weights?
Thanks,
Alfonso.
I was preparing a little example to show my students how the between estimator is simply an estimator on the averages of the different variables at the panel level, and curiously enough I found that Stata provides close but different in the example I was preparing. Here is the code:
Code:
clear all set more off webuse nlswork, clear global x "age race collgrad grade hours" keep idcode year ln_wage $x * xtreg be xtset idcode year xtreg ln_wage $x, be * regress estimation collapse ln_wage $x, by(idcode) regress ln_wage $x
Thanks,
Alfonso.
Comment