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: Stop Stata rounding up decimal places when import from Excel
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: Stop Stata rounding up decimal places when import from Excel
Date
Wed, 1 Aug 2012 16:18:10 +0200
On Wed, Aug 1, 2012 at 3:33 PM, <[email protected]> wrote:
> In my excel file I have one variable that has 7 digits and 7 decimal places, e.g. 1234567.1234567.
>
> When I import the file into Stata, it rounds up the decimal place of the variable to 1234567.12
>
> How can I change the setting so that Stata would not round up my decimal places?
You need to make sure to import that variable as a double not as a float.
For (much) more see :
<http://blog.stata.com/2012/04/02/the-penultimate-guide-to-precision/>
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/