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 <>
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:

and you can obtain it within Stata by typing:

ssc install tabout


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.

. tabulate race, format(%2.1%)
option format() not allowed

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

* For searches and help try:

*   For searches and help try:

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