Bookmark and Share

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: Rounding Errors Stata 12


From   Marta García-Granero <[email protected]>
To   [email protected]
Subject   Re: st: Rounding Errors Stata 12
Date   Wed, 13 Feb 2013 15:37:17 +0100

Hi Charles:

The default storage type format for insheet is float. Try reading your file as double:

insheet using "data.csv", comma clear double


HTH,
Marta Garcia-Granero

(PS: first post of a veeery long time SPSS user, recently switched to Stata, still a bit overwhelmed)

El 13/02/2013 15:25, Gray, Charles escribió:
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:
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index