Statalist The Stata Listserver


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

Re: st: Rounding output to one decimal place


From   Ian Watson <[email protected]>
To   [email protected]
Subject   Re: st: Rounding output to one decimal place
Date   Sat, 31 Mar 2007 21:38:43 +1000

Dear Shelby

-tabout- will do what you want. Among other things, it is a wrapper for -tabulate- and will allow you to get the result you want:

tabout race using myfile.txt, f(1)

It's formating is simpler than that found in -tabulate- (just give the number of decimal places) and it also allows currencies and percentage symbols.

You can check it out quickly by looking at the tutorial at:
http://www.ianwatson.com.au/stata/tabout_tutorial.pdf

and you can obtain it within Stata by typing:

ssc install tabout

Cheers
Ian

McCulley, Shelby wrote:

My office is in the process of implementing Stata as our data analysis
tool. Our standard for reports is that we (nearly always) round numbers
in tables to one decimal point.
The -format- option appears to work with -table- and -tabstat-, so I can
round output for a table of means or medians (for example). However,
-tabulate-, which we would use for frequency distributions on
categorical variables, does not accept the -format- option.

Example:
. tabulate race, format(%2.1%)
option format() not allowed
r(198);


Any suggestions would be appreciated. Most of what I've found on the
internet relates to output for regression or other more-advanced
analyses - I'm hoping there is a simple solution I have overlooked.
Thank you!

Shelby McCulley
Wisconsin Legislative Audit Bureau
Phone: 608.259.9825
Fax: 608.267.0410
[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/



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