在文献中看到“Regressions 2–6 include firm fixed effects. Errors in parentheses are clustered at the firm level.”
效仿它的做法,正常的命令应该是:
xi:xtreg y x i.year ,fe vce cluster(number)
注:numbe为公司股票代码
但问题在于我需要做两组间的组间系数差异检验,即:
suest m1 m2
test [m1_mean]x=[m2_mean]x
如果还是要控制公司固定效应,此时不能使用xtreg命令。
只能用xi:reg y x i.year i.number
但是这个时候如何cluster 呢?尝试命令如下:
xi:reg y x i.year i.number if a==1 , vce cluster(number)
est store m1
xi:reg y x i.year i.number if a==0, vce cluster(number)
est store m2
suest m1 m2
test [m1_mean]x=[m2_mean]x
但反馈是
m1 was estimated with cluster(number).
re-estimate without the cluster() option, and
specify the cluster() option with suest.
还是不行呢,黄老师。
suest m1 m2,vce(cluster number )
m1 was estimated with cluster(number).
re-estimate without the cluster() option, and
specify the cluster() option with suest.
r(322);
“ Estimation should take place without the vce(robust) or vce(cluster clustvar) option. suest always computes the robust estimator of the (co)variance, and suest has a vce(cluster clustvar) option.” 来自stata官方手册pdf。
请问面板数据,个体、时间双方固定效应,在分组回归过程中用的robust,然后就出现了如下报错:
a was estimated with cluster(id).
re-estimate without the cluster() option, and
specify the cluster() option with suest.
我目前的理解是这样的:
在做分组回归时,还是用robust,并导出robust的结果;但是在做差异性检验的时候,不加入robust,用cluster检验,对吗?