还要请教一下,根据建议插入如下代码
destring cic,replace
gen f=cic
if year<2003{
replace f=新代码1 if cic==旧代码1
replace f=新代码2 if cic==旧代码2
.
.
replace f=新代码n if cic==旧代码n
}
drop f
rename f cic
tostring cic replace
发现有个问题,有些观测值的cic代码是以0开头的,比如0912,在destring之后再tostring就会变成912,前面的0不见了,
不知道这个如何处理呢?