应版主要求先发一条等价命令上来,由于Eviews的结果是以表格呈现出来,所以还要截图贴上来,怕发贴有限制。如果有需要,我也可以把剩下的贴上来,命令行以红色来标注。值得注意的是由于两种软件采取的迭代方法略有差异,因此标准误并不完全相同。下面以网上的invest2数据为例:
STATA命令:
use http://www.stata-press.com/data/r11/invest2.dta
xtset company time
xtgls market invest stock, panels(hetero)
结果:
Cross-sectional time-series FGLS regression
Coefficients: generalized least squares
Panels: heteroskedastic
Correlation: no autocorrelation
Estimated covariances = 5 Number of obs = 100
Estimated autocorrelations = 0 Number of groups = 5
Estimated coefficients = 3 Time periods = 20
Wald chi2(2) = 159.43
Prob > chi2 = 0.0000
------------------------------------------------------------------------------
market | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
invest | 3.616278 .5102399 7.09 0.000 2.616226 4.61633
stock | .7711491 .378626 2.04 0.042 .0290557 1.513243
_cons | 543.555 78.41464 6.93 0.000 389.8652 697.2449
------------------------------------------------------------------------------
Eviews 命令:
equation eq01.ls(wgt=cxdiag) market invest stock c
结果: