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]
st: Fixed format question
From
Bob Fitzgerald <[email protected]>
To
[email protected]
Subject
st: Fixed format question
Date
Sat, 19 Jun 2010 11:13:55 -0700 (PDT)
For a report I need to have all numbers rounded and formatted to 2 decimal places. I expected
that for var1 = .015 formatted to 2 decimal places, .02 would be shown. However, applying
"format var1 %4.2f" and displaying var1 shows .01.
As an analogue, I tried the following: var2=.15, to which I applied "format var2 %4.1". The
resulting display is ".2".
Any hints about how to achieve my desired result would be much appreciated.
Many thanks.
Bob
*
* 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/