楼主: dengtinghe
1158 3

[数据管理求助] 数据删除 [推广有奖]

  • 19关注
  • 2粉丝

已卖:7份资源

博士生

47%

还不是VIP/贵宾

-

威望
0
论坛币
867 个
通用积分
6.5231
学术水平
1 点
热心指数
1 点
信用等级
1 点
经验
23719 点
帖子
163
精华
0
在线时间
366 小时
注册时间
2011-11-4
最后登录
2024-10-8

楼主
dengtinghe 发表于 2015-7-2 20:53:11 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
数据中有-9.9用drop删除为什么处理不掉?具体如图


QQ图片20150702204807.png
二维码

扫码加我 拉你入群

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

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

关键词:drop

沙发
xddlovejiao1314 学生认证  发表于 2015-7-2 21:11:47
试试drop if p8_4=-9.9呢?
已有 1 人评分论坛币 收起 理由
admin_kefu + 10 热心帮助其他会员

总评分: 论坛币 + 10   查看全部评分

藤椅
andruw 在职认证  发表于 2015-7-2 21:47:00
可尝试:
  1. drop if p8_4 == float(-9.9)
复制代码
具体原因可见:
  1. help float

  2. Although you may store your numeric variables as byte, int, long, float, or double, Stata converts all numbers to double before performing any calculations.
  3.                      Consequently, difficulties can arise in comparing numbers that have no finite binary representations.

  4.                      For example, if the variable x is stored as a float and contains the value 1.1 (a repeating "decimal" in binary), the expression x==1.1 will evaluate to false because
  5.                      the literal 1.1 is the double representation of 1.1, which is different from the float representation stored in x.  (They differ by 2.384 x 10^(-8).) The expression
  6.                      x==float(1.1) will evaluate to true because the float() function converts the literal 1.1 to its float representation before it is compared with x. (See [U] 13.11
  7.                      Precision and problems therein for more information.)
复制代码
已有 1 人评分论坛币 收起 理由
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20   查看全部评分

板凳
dengtinghe 发表于 2015-7-3 08:33:24
andruw 发表于 2015-7-2 21:47
可尝试:具体原因可见:
非常非常感谢

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

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