Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: automatically added decimals in Stata
From
"Ruizendaal, Esmee" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: automatically added decimals in Stata
Date
Tue, 18 Mar 2014 14:51:12 +0000
Thanks Rich. I did search within the archives but apparently with the wrong search terms or not well enough (I must admit I did not look through all hundreds of pages). I now found a reply in the archives that was helpful (April 2003: problem with stata misreading decimals).
Esmée
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Richard Goldstein
Sent: dinsdag 18 maart 2014 15:21
To: [email protected]
Subject: Re: st: automatically added decimals in Stata
this has been discussed many times on Statalist as a search of the archives would show you
for a second source of info, see -h precision-
Rich
On 3/18/14, 10:15 AM, Ruizendaal, Esmee wrote:
> Dear statalist,
>
> I noticed a weird thing in my stata data file. When viewing my data I see for example the value 186.6, which is the correct value. However when I select the cell, it shows that the real value is 186.60001 and this is happening quite randomly in many cells, value 6.2 is made into 6.1999998, while value 14.5 remains just 14.5.
> These examples are all from the same column, but it is also happening in other columns. Even if I re-enter my data it changes to these weird numbers with many decimals again (adding or subtracting .00001). I have tried to play a bit with the variable type and format (type is currently float and format %9.0g), but that does not help (or I am left with no decimals at all).
>
> Does anyone know why this is happening and how I can solve it? Thanks for your time!
>
> Kind regards,
> Esmée
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/