老树皮 发表于 2012-8-10 18:53 
下面是我用Stata中自带的数据做的一个例子。race是time-invariant的变量。
只是不知道为什么我的Stata中 ...
谢谢你亲自帮我演示一遍,下面是我自己在stata中做的结果,按照你给出的步骤,我做出的结果跟一开始做的的确有所不同,unite 和background是0,1变量,不随时间改变,现在做出来的结果是
unite 和background显著相关。我想要证明的是roe与unite、background的关系,接下来应该怎么做呢?是不是结果已经证明它们之间显著相关了呢?非常感谢!
"D:\STATA\data\unite0810.dta", clear
. tsset code year
panel variable: code (strongly balanced)
time variable: year, 1 to 3
delta: 1 unit
. xtreg roe unite background topshare size lev growth, fe
note: unite omitted because of collinearity
note: background omitted because of collinearity
Fixed-effects (within) regression Number of obs = 702
Group variable: code Number of groups = 234
R-sq: within = 0.7149 Obs per group: min = 3
between = 0.0355 avg = 3.0
overall = 0.2555 max = 3
F(4,464) = 290.86
corr(u_i, Xb) = -0.6440 Prob > F = 0.0000
------------------------------------------------------------------------------
roe | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unite | 0 (omitted)
background | 0 (omitted)
topshare | -2.495425 1.13707 -2.19 0.029 -4.729871 -.2609801
size | .8590939 .0538153 15.96 0.000 .753342 .9648458
lev | -1.722668 .2131391 -8.08 0.000 -2.141506 -1.303831
growth | .0555929 .0661897 0.84 0.401 -.0744758 .1856616
_cons | -15.14238 1.294611 -11.70 0.000 -17.6864 -12.59835
-------------+----------------------------------------------------------------
sigma_u | .74010464
sigma_e | .48527831
rho | .69933602 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(233, 464) = 2.82 Prob > F = 0.0000
. predict y_hat,xb
. gen e=roe-y_hat
. reg e unite background
Source | SS df MS Number of obs = 702
-------------+------------------------------ F( 2, 699) = 7.60
Model | 10.4807957 2 5.24039783 Prob > F = 0.0005
Residual | 481.669562 699 .689083779 R-squared = 0.0213
-------------+------------------------------ Adj R-squared = 0.0185
Total | 492.150357 701 .702068983 Root MSE = .83011
------------------------------------------------------------------------------
e | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
unite | -.1662893 .0673773 -2.47 0.014 -.2985754 -.0340032
background | .2346946 .065596 3.58 0.000 .1059058 .3634835
_cons | .001158 .05423 0.02 0.983 -.1053152 .1076313
------------------------------------------------------------------------------