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