sort Current_Status
tab Current_Status
sortobs Current_Status,val("不详" "在职" "退休" "死亡") first //定序排序
sencode Current_Status,replace //字符变为数字文字对应表
replace Current_Status = -9 if Current_Status == 1 //修改变量
elabel recode Current_Status (1 = -9) , define(Current_Status_l) //同时将label进行修改
lab val Current_Status Current_Status_l
网友评论