Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Significant figures formats


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Significant figures formats
Date   Fri, 18 Jul 2003 18:06:21 +0100

At 11:19 18/07/03 -0500, Bill Gould wrote (re significant figures formats):

With Stata 8, try %9.2g, %8.2g, or %<w>.2g:

        . display %9.2g 4.52394e-3
            .0045

        . display %9.2g 4.52394e-5
          .000045

Display value x with %<w>.<d>g, with d!=0, does not display significant
figures, but for |x|<1, it does.

Let me repeat something I wrote on 7apr2003:

.
.
<A lot of very useful info>
.
.

If there is an interest in the round-and-pad solution, we would be willing to
implement a %G format to go along with %g.
Thanks to Bill for his very helpful advice, which saved me a bit of not-very-interesting programming. The %10.2g format is very useful, but I think the proposed "round-and-pad" %10.2G format would be even better.

Best wishes

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index