Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Turn off scientific notation


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Turn off scientific notation
Date   Wed, 20 Aug 2008 22:52:25 +0100 (BST)

--- Diana Eastman <[email protected]> wrote:
> I have a variable that needs to be expressed with a high level of
> precision. Stata keeps representing the value as 1.871e+09, for
> example. I need this number to be formatted as a decimal, preferably
> with as many decimal places as possible. I tried using format totppm
> %12.10f, but that doesn't do the trick. Is there some way to turn off
> the use of scientific notation?

You need to distinguish between how the variable is displayed and how
the variable is stored. The way the variable is displayed is governed
by -format-, while the way it is stored is governed by the datatype of
the variable. If you want high precision and the variable can contain
digits behind the decimal point then the best you can do is create or
import the data as a double precision variable, if the variable is all
integers then you can create or import the variable as a long, or if
you need even more precision store it as a string. See: -help format-,
-help datatype-, and http://www.ats.ucla.edu/stat/Stata/faq/longid.htm

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com 
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index