我用stata处理数据时,运用计算生成新变量后,新变量的数值不仅变了,且小数点后面应该有的数也没有了,是怎么回事啊?
数据是这样的:
. dataex qycode goodscode, count(20)
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. For more info, type help dataex
- clear
- input double qycode long goodscode
- 3303936223 85351000
- 3208930264 40112000
- 3303936223 85354000
- 3303936223 85389000
- 1305910037 70051000
- 3109935072 16024910
- 4403964580 69079000
- 3501969048 64022000
- 4428960076 87141900
- 3306931134 30051010
- 3306931134 30059010
- 4401910035 73079900
- 3109935072 16023210
- 4401910035 73063000
- 3214960103 60019200
- 4403111049 94060000
- 3202330722 85021100
- 4428960076 87112010
- 4403111049 85179010
- 3301949041 61169900
- end
------------------ copy up to and including the previous line ------------------
我用的命令是:
. gen qygoods=qycode+(goodscode/100000000)
. format qygoods %25.8g
以第一行数据为例,运用以上命令后应该是3303936223.85351000,但结果是3303936256。
本以为是因为goodscode和qycode数据类型不一样,但我改了还是不行。
请问大家,问题出在哪里啊?
跪谢啦!


雷达卡



京公网安备 11010802022788号







