如果符号只有上面几个,那么
clear
input str20 id
"if age+10=age2"
"if age=50 & sex=1"
end
gen idd=subinstr(id,"if ","",.)
split idd,parse("+""&""=")
egen name=seq()
destring idd*,replace
foreach v of local idd* {
capture confirm string variable `v'
if _rc {
drop `v'
}
}
reshape long idd,i(name)j(var)


雷达卡
京公网安备 11010802022788号







