freesky521 发表于 2012-4-4 03:48 
最后的结果,出现了“type mismatch" 的错误。。。不知道是怎么回事。。
You probably attempted to generate a new string variable and
forgot to specify its type, so Stata assumed the new variable
was to be numeric. Include a str# before the name of the new
variable in your generate statement. More generally, in an
expression you attempted to combine a string and numeric
subexpression in a logically impossible way. For instance,
you attempted to subtract a string from a number or you
attempted to take the substring of a number.