楼主: 欢欢猪儿
2999 2

[字符问题求助] 字符型变成数值型 encode和string有何区别 [推广有奖]

  • 0关注
  • 0粉丝

大专生

31%

还不是VIP/贵宾

-

威望
0
论坛币
574 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
726 点
帖子
26
精华
0
在线时间
36 小时
注册时间
2012-4-20
最后登录
2016-10-23

楼主
欢欢猪儿 在职认证  发表于 2013-8-3 16:35:32 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
字符型变成数值型 encode和string有何区别?应该如何写命令?
二维码

扫码加我 拉你入群

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

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

关键词:encode string tring code RING encode

沙发
egg10 发表于 2013-8-3 16:46:56
看看

藤椅
ywh19860616 发表于 2013-8-4 10:22:57
encode is designed for situations in which you have a string variable, typically containing meaningful nonnumeric text (e.g., male, female), and wish to have the equivalent information as a numeric variable with labels. This goes way back in Stata history.

destring is designed for situations in which you have a string variable, typically containing meaningful numeric text (e.g., 1, 2), which you wish to convert to the numeric variable it should properly be. Usually, that variable is now string because of some mistake. Perhaps the mistake was yours, because what you initially typed in Stata's Data Editor was nonnumeric. Or, perhaps the numeric text is contaminated by nonnumeric text from some earlier operation (e.g., in a spreadsheet), and Stata spotted that.
已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
xddlovejiao1314 + 10 + 1 + 1 + 1 精彩帖子
dxystata + 20 好的意见建议

总评分: 经验 + 10  论坛币 + 20  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

一份耕耘,一份收获。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-22 16:00