全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1400 1
2012-07-17
stata中有某个numerical variable, type是float. 如下:
  var             share
obs1           39.92
obs2           35.44
obs3           35.3
....
进行如下操作:
gen share_new=share
原data变成:
  var             share         share_new
obs1           39.92         39.919998
obs2           35.44         35.439999
obs3           35.3           35.299999
(note: 虽然share_new 显示出来还是小数点后面两位,但点进去的具体数字如上)
查看share_new 的variable type 也是float。。

请问如何将share_new的数字变成与share的完全一致? 现在两个variables的type都是float。

多谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2012-7-18 10:21:17
check your data again, share and share_new are exactly the same

If you are really curious about number precision, type "help data type"

or read the following section in the manual:

[ U ] 13.11 Precision and problems therein
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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