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

st: Formatting and variable problem


From   Fred Wolfe <fwolfe@arthritis-research.org>
To   statalist@hsphsun2.harvard.edu
Subject   st: Formatting and variable problem
Date   Wed, 03 Jul 2002 07:24:57 -0500

I have a program which does various calculation and then ends with the following line:

di as text "{ralign `startcol' : `outname'}" " {c |}" as result "{ralign 9: `N' `mean' `sd' `se' `median' `min' `max' `lci' `uci'}"

If any of the macros are empty (`N' `mean' `sd' `se' `median' `min' `max' `lci' `uci'), as would often be expected, then no result for the missing macro is displayed. However, each missing macro uses exactly 1 character space. Therefore the output is not uniform as to spacing, and it is hard to line up titles above the output.

Solutions that have been tried are putting -`N' `mean' `sd' `se' `median' `min' `max' `lci' `uci'- into a macro or string of its own, where it can be operated on. Doesn't work, Stata doesn't allow.

Is there anyway to make Stata not take 1 character for empty macros? Does anyone have an alternative solution for displaying the data uniformly"

Thanks,

Fred Wolfe



---------------------------------------------------------------------------- ------------------------
Fred Wolfe Tel (316) 263-2125
National Data Bank for Rheumatic Diseases Fax (316) 263-0761
Wichita, Kansas fwolfe@arthritis-research.org
---------------------------------------------------------------------------- -------------------------
*
* 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