Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Rounding Errors Stata 12

From   Stas Kolenikov <>
Subject   Re: st: Rounding Errors Stata 12
Date   Wed, 13 Feb 2013 08:38:27 -0600

Read about -help data types- and -insheet- your data as -double-s. The
default -float- does not have enough accuracy. (Add it to the wish
list for Stata 13: make -double- the default type, or get rid of
-float-s whatsoever; I have -set type double- in my, and
only generate -float- variables when I need to reproduce somebody's
round-off errors.)

-- Stas Kolenikov, PhD, PStat (SSC)  ::
-- Senior Survey Statistician, Abt SRBI  ::  work email kolenikovs at
srbi dot com
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer

On Wed, Feb 13, 2013 at 8:25 AM, Gray, Charles <> wrote:
> I am having an issue with Stata 12 adding decimal places to data that I
> insheet. I simply have a dataset in .csv format. The dataset contains a
> variable 'item_revenue.' When I open the dataset in Excel, several
> observations have a value of 60237.8 for the 'item_revenue' variable.
> However, when I insheet the dataset into Stata, these values change to
> 60237.801. My insheet command is simply,
> insheet using "data.csv", comma clear
> My understanding is that the .csv format saves only the text and values
> as they are displayed in cells of the active worksheet. So does anyone
> know why Stata would add decimal places to a variable?
> Thanks,
> Charlie
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index