Unexpected handling of large integers, and is not obviously (to me) a numerical precision or data storage issue.
In this example I generate a data set with 10 observations, variable x has values 1-7 for observations 1-7, and observations 8-10 have very large integers. Version 18 "table" command knows they are there but does not display them.
Wondering if anyone knows why this is happening, and issue another warning for users about large integers in Stata.
In this example I generate a data set with 10 observations, variable x has values 1-7 for observations 1-7, and observations 8-10 have very large integers. Version 18 "table" command knows they are there but does not display them.
Wondering if anyone knows why this is happening, and issue another warning for users about large integers in Stata.
Code:
clear set obs 10 gen long x=_n replace x=99999993 in 8 replace x=99999994 in 9 replace x=99999996 in 10 version 16 : table x , row version 18 : table x * the total is 8, not 10 as reported * (but it should be 10) clear set obs 10 set type double gen x=_n replace x=99999993 in 8 replace x=99999994 in 9 replace x=99999996 in 10 format x %20.0g version 16 : table x , row version 18 : table x * the total is 8, not 10 as reported * (but it should be 10)
Code:
. version 16 : table x , row ---------------------- x | Freq. ----------+----------- 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 1 7 | 1 99999993 | 1 99999994 | 1 99999996 | 1 | Total | 10 ----------------------
Code:
. version 18 : table x ------------------------ | Frequency ------------+----------- x | 1 | 1 2 | 1 3 | 1 4 | 1 5 | 1 6 | 1 7 | 1 100000000 | 1 Total | 10 ------------------------ . * the total is 8, not 10 as reported . * (but it should be 10)
Comment