gen predicted_return=.
egen id=group(group_id )
forvalues i=1(1)1682 {
l id group_id if id==`i' & dif==0
quiet reg dretwd retindex if id==`i' & estimation_window==1 predict p if id==`i'
replace predicted_return = p if id==`i' & event_window==1
drop p
}
问题:
在上述循环命令中,如何如下命令运行后:
quiet reg dretwd retindex if id==`i' & estimation_window==1
当retindex的系数不显著时,则predict p if id==`i'不在运行
当retindex的系数显著时,则继续predict p if id==`i'的运行
谢谢!!
[此贴子已经被作者于2009-5-22 23:24:59编辑过]