我从网上下载到一个STATA的ado程序,程序如下:
*. simpbin0 dvf, bin(varlist) exog(varlist)
/* The model is D=I(v+x'B+e>0), E(ez)=0,
conditional density of v is f .*/
*set trace on
cap pro drop simpbin0
pro def simpbin0, eclass
version 8.0
local varlist "required existing min(3) max(3)"
local if "optional "
local options "bin(string) exog(string)"
parse "`*'"
preserve
tokenize "`varlist'"
gen `1'star=(`1'-(`2'>=0))/`3'
di in g " "
di in g "Based on the known conditional density of `2', f(`2'|.)"
di in g " "
di in g "`1'star is constructed as (`1'-(`2'>=0))/ f(`2'|.)"
ivreg `1'star (`bin'=`exog'), robust
drop `1'star
end
请教大家,标红的语句该如何解读呢,除了设置局部宏,还有什么其他的作用吗?并且这个程序没有args 或者syntax语句的设置,如何保证运行时的格式呢?谢谢各位啦。