求助:
下面是做固定效应显著性检验的步骤
*-Test fixed effect-*
// step1 : estimate Pooled model and store R2
reg mvalue invest kstock
ereturn list /*to reader: please see the results after this command*/
local R2_r = e(r2)
local K = e(df_m)
// step2 : estimate Fixed-effect model and store R2
xtreg mvalue invest kstock , fe
local R2_u = 1- e(rss)/e(tss)
local nT = e(N)
local n = e(N_g)
// step3 : calculate the F statistics and P-value
local F1 = (`R2_u' - `R2_r')/(`n' - 1)
local F2 = (1 - `R2_u')/(`nT' - `n' - `K')
local F = `F1'/`F2'
local p = 1- F(`n' - 1,`nT' - `n' - `K',`F')
#delimit ;
dis in ye "The F test for all u_i=0 is : " %8.2f `F' _n
in ye "The P-value is: " %6.4f `p' ;
#delimit cr
我的问题是:黑色加粗的这部分在command窗口要输入吗?也是输入一行来一次回车吗?就是说,操作过程是什么样的?试了很多次都出错了!高手请指点。