在采取模型计算操纵性应计盈余指标时,在使用循环函数是出现无效指令,这是什么原因造成的,想知道是不是应该把空缺值删掉?gen EXBI=yingyeshouru-yingyechengben
gen cfo=jingyingxianjinjin-jingyingxianjinchu
gen year1=year(acc)
xtset stkcd year1
gen Acc=(EXBI-cfo)/L.zongzichan
gen invA=1/L.zongzichan
gen Dsale=D.yingyeshouru/L.zongzichan
gen Dar=yingshouzhangkuan/L.zongzichan
gen Ds_Dar=Dsale-Dar
gen Ppe=gudingzichan/L.zongzichan
egen ind_year=group(ind year1),label lname(ind_year)
gen Dacc=.
forvalues i=1/$N{
qui reg Acc invA Ds_Dar Ppe if (ind_year==`i'),nocons
qui predict e if e(sample),res
qui replace Dacc =e if e(sample)
drop e
}
dataex Acc invA Ds_Dar Ppe in 1/100
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
Listed 100 out of 2392 observations
.