如何实现
gen parent_mig = (fa_mig==1|mo_mig==1) //在括号中,满足等于1;不满足等于0
tab parent_mig fa_mig,m //检查生成情况
lab var parent_mig "父母有一方外出务工"
gen parent_mig = (fa_mig==1|mo_mig==1) //在括号中,满足等于1;不满足等于0
tab parent_mig fa_mig,m //检查生成情况
lab var parent_mig "父母有一方外出务工"
本文标题:Stata--一行语句生成有条件dummy variable
本文链接:https://www.haomeiwen.com/subject/xfgynctx.html
网友评论