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"