It seems that -outsheet- respects the display format of a variable, so
you need to be sure that the display format is such that all the digits
are displayed. So something like
. format myvar %15.0g
should do the trick. See below:
. format var1 %9.0g
. list
var1 var2 var3
1. 5.31e+08 123 435
. outsheet using junk.txt, replace
. type junk.txt
var1 var2 var3
5.31e+08 123 435
. format var1 %12.0g
. list
var1 var2 var3
1. 531123435 123 435
. outsheet using junk.txt, replace
. type junk.txt
var1 var2 var3
531123435 123 435
-----------------------------------------------------------
Nicholas Winter, Ph.D. P 202.939.5343
Policy Studies Associates F 202.939.5732
1718 Connecticut Avenue, NW [email protected]
Washington, DC 20009-1148 www.policystudies.com
-----------------------------------------------------------
> -----Original Message-----
> From: Dean Yang [mailto:[email protected]]
> Sent: Friday, June 07, 2002 12:28 PM
> To: [email protected]
> Subject: st: avoiding rounding when using -outsheet-
>
>
> Can anyone tell me how to keep my data from being rounded to
> 3 significant
> figures when exporting my data from Stata using -outsheet-?
>
> For example, I have an item of data which is 531,123,435 (531
> million, 123
> thousand, and 435). When I use -outsheet- to create an ASCII
> file of the
> data, this data point becomes 531,000,000 in the ASCII file.
>
> The variable storage type is numeric (double).
>
> What is going on? How can I keep the data from being rounded without
> exporting the data as a string variable?
>
> Thanks in advance,
> Dean Yang
> ________________________
> Dean Yang
> Ph.D. Candidate, Economics
> Harvard University
> email [email protected]
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/