参考了下帖子 , 提示
invalid syntax
请教怎么解决
egen m=group(stkcd ym)
sum m
local n=r(max)
gen b2=.
forv i=1/'n'{
reg l.r c d if m=='i'
matrix eb=e(b)
replace b2=eb[1,2] in 'i'
}
statsby _b, by(stkcd ym): reg l.r c d
提示错误
(running regress on estimation sample)
time variable not set
an error occurred when statsby executed regress