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

RE: st: RE: command about setting macro format


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: command about setting macro format
Date   Wed, 6 Jul 2005 19:54:48 +0100

Yes, as I already indicated. 

e.g. 

local pi = _pi 
di as res %2.0f `pi' 
di as res %2.1f `pi' 
di as res %3.2f `pi' 
di as res %6.5f `pi' 

Nick 
[email protected] 

Luhang Wang

> Thanks for the remind that "macros are macros and variables are
> variables". I stored the statistics as macros.
> But as stated in the help for -format-, does it only work for
> variables? Or for macros as well? Thank you!
 
Nick Cox 

> > Macros are macros; variables are variables.
> > There is nothing in Stata called a macro
> > variable.
> > 
> > Either way, formats are to be understood
> > by reading the help for -format-. Then use
> > the appropriate formats in your -display- commands.

Luhang Wang

> > > I'm making a table displaying some summary statistics which I have
> > > stored as macro variables. They are displayed as of 16 
> digits, which
> > > is far more than the precision I want. So could anyone 
> give me some
> > > idea about setting the format for macro variables? Thanks a lot!

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