jjjj6666 发表于 2014-2-23 06:40 
you can use reshape, for example, suppose the var names are (id is string var)
id, type, amount, ye ...
我数据里面的这四个变量名分别是code、repat、sisam、year
这四个变量我都destring了
. gen code_year=code+"_"+string(year)
type mismatch
r(109);
.
. reshape wide sisam, i(sisam_year) j(repat)
variable sisam_year not found
r(111);
.
. keep sisam*code year
variable sisam*code not found
r(111);
能帮我指出是哪出错了不?