全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
50613 11
2019-03-09
命令如下:. *划分企业标准
. *0代表高科技产业,1代表非高科技产业
. gen industry= "1"
. destring industry,replace force
industry contains nonnumeric characters; replaced as byte
. destring ids_1,replace force
ids_1 already numeric; no replace
. replace industry= "0" if ids_1== "2710"|ids_1== "2720"
type mismatch
r(109);


industry的类型是byte, ids_1的类型是Int,
求大神指导

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2019-3-9 22:43:12
复制代码

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-10 08:02:36
Bi1ld 发表于 2019-3-9 22:43
你给的资料有何问题?要做什么?请说明!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-10 08:26:48
黃河泉 发表于 2019-3-10 08:02
你给的资料有何问题?要做什么?请说明!
[code]
. gen industry= "1"
. destring industry,replace force
industry contains nonnumeric characters; replaced as byte
. destring ids_1,replace force
ids_1 already numeric; no replace
. replace industry= "0" if ids_1== "2710"|ids_1== "2720"
type mismatch
r(109);
就是使用replace之后出现了type mismatch的问题,求解答,谢谢大神
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-10 08:26:55
黃河泉 发表于 2019-3-10 08:02
你给的资料有何问题?要做什么?请说明!
[code]
. gen industry= "1"
. destring industry,replace force
industry contains nonnumeric characters; replaced as byte
. destring ids_1,replace force
ids_1 already numeric; no replace
. replace industry= "0" if ids_1== "2710"|ids_1== "2720"
type mismatch
r(109);
就是使用replace之后出现了type mismatch的问题,求解答,谢谢大神
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2019-3-10 09:10:56
Bi1ld 发表于 2019-3-10 08:26
[code]
. gen industry= "1"
. destring industry,replace force
我没兴趣看别人的程序,请说明给的资料 (你做的事与给的资料为何是两码事?) 有何问题?要做什么?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群