Statalist The Stata Listserver


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

RE: st: RE: formatting for significant figures


From   "b. water" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: formatting for significant figures
Date   Wed, 10 May 2006 13:33:59 +0000

Thank you Maarten for your suggestion. This is what I obtained:

. format trite %9.2e

. l trite in 1/5, clean

          trite  
  1.   4.10e-03  
  2.   4.75e-03  
  3.   3.80e-03  
  4.   4.82e-03  
  5.   7.83e-03  

Actually what I wanted was to be able to display like (and I concoct this):

 1.   .0041 
 2.   .0047 
 3.   .0038 
 4.   .0048 
 5.   .0078 

When I refer back to the manual [U] 15.5, it stated putting an optional 0 to retain leading zeros, so I tried format trite %09.2e, which did not give a different result from what you have given. But when I did %09.2g it did! Problem solved.

Thank you,
bw



----------------------------------------
> Subject: st: RE: formatting for significant figures
> Date: Wed, 10 May 2006 15:10:18 +0200
> From: [email protected]
> To: [email protected]
> 
> -format trite %9.2e-
> HTH,
> Maarten
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology 
> Vrije Universiteit Amsterdam 
> Boelelaan 1081 
> 1081 HV Amsterdam 
> The Netherlands
> 
> visiting adress:
> Buitenveldertselaan 3 (Metropolitan), room Z214 
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]On Behalf Of b. water
> Sent: woensdag 10 mei 2006 15:06
> To: statalist
> Subject: st: formatting for significant figures
> 
> hi all,
> 
> Stata 8.2,
> 
> Is there a way to format numericals results for significant figures. For example:
> 
> . sysuse auto
> 
> . gen trite=price/1000000
> 
> . l trite in 1/10, clean
> 
>          trite 
>   1.   .004099 
>   2.   .004749 
>   3.   .003799 
>   4.   .004816 
>   5.   .007827 
>   6.   .005788 
>   7.   .004453 
>   8.   .005189 
>   9.   .010372 
>  10.   .004082 
> 
> How can I format trite to display just 2 (or any number in general) significant figures? I looked at [R] Format,  [U] 15.5, help format, searched the list using 'signifcant figures' and Googled 'stata significant figures' but without success. Appreciate advice/help.
> 
> Regards,
> bw
> 
> _________________________________________________________________
> Join the next generation of Hotmail and you could win the adventure of a lifetime
> http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
> *
> *   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/

_________________________________________________________________
Enter the Windows Live Mail beta sweepstakes
http://www.imagine-msn.com/minisites/sweepstakes/mail/register.aspx
*
*   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/



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