I tried to replicate the following stata webpage example in gretl by creating cwc
variables for tenure and age. After running, the number of observations are different and
race_1 coefficient is very different although other coefficients are comparable. Any
suggestions?
https://www.stata.com/stata-news/news39-4/correlated-random-effects-models/
Model 1: Random-effects (GLS), using 28522 observations
Included 4699 cross-sectional units
Time-series length: minimum 1, maximum 15
Dependent variable: ln_wage
Standard errors clustered by unit
coefficient std. error z p-value
---------------------------------------------------------
const 1.07919 0.0308898 34.94 2.07e-267 ***
tm_tenure 0.0586924 0.00210393 27.90 2.93e-171 ***
tm_age 0.0111681 0.00113419 9.847 7.08e-023 ***
Drace_1 0.131393 0.0117410 11.19 4.52e-029 ***
Drace_3 0.236570 0.0592482 3.993 6.53e-05 ***
Mean dependent var 1.675133 S.D. dependent var 0.478001
Sum squared resid 5607.429 S.E. of regression 0.443427
Log-likelihood −17274.26 Akaike criterion 34558.52
Schwarz criterion 34599.81 Hannan-Quinn 34571.80
rho 0.311897 Durbin-Watson 1.017081
'Between' variance = 0.106527
'Within' variance = 0.102584
mean theta = 0.577464
corr(y,yhat)^2 = 0.13988
Joint test on named regressors -
Asymptotic test statistic: Chi-square(4) = 1467.73
with p-value = 0
Breusch-Pagan test -
Null hypothesis: Variance of the unit-specific error = 0
Asymptotic test statistic: Chi-square(1) = 20404.8
with p-value = 0
Data:
https://www.dropbox.com/scl/fi/zd5od9r00esst52obcxtm/nlsdata.dta?rlkey=nu...