This is due to limited storage precision (see -help data types-). Try
using doubles:
. clear
. set obs 1
obs was 0, now 1
. gen double famsoxc02=891.1
. replace famsoxc02=famsoxc02/100
(1 real change made)
. tab famsoxc02
famsoxc02 | Freq. Percent Cum.
------------+-----------------------------------
8.911 | 1 100.00 100.00
------------+-----------------------------------
Total | 1 100.00
ben
On 6/13/07, martina brandt <[email protected]> wrote:
dear statalist,
i am quite surprised because i always thought stata is perfect and everything that goes wrong is my own fault. but this time i am really puzzled:
gen famsoxc02=0
*...
replace famsoxc02= 891.1 if land== 6
*...
replace famsoxc02=famsoxc02/100
tab famsoxc02 land if index==1
i get 8.910999 - should be 8.911. Can anyone explain?
martina
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/