请问,在STATA中使用chp8_panel.do,附录A4“local F1 = (`R2_u' - `R2_r')/(`n' - 1)”时,总是提示我R2 是非法的变量,不知道怎么修改,详细的程序段:
reg mvalue invest kstock
ereturn list
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)