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

Re: st: RE: percent format


From   Fred Wolfe <fwolfe@arthritis-research.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: percent format
Date   Mon, 13 Jun 2005 12:48:11 -0500

It isn't so much the labels as the formatting of numbers. Suppose one has a 0/1 variables indicating positive/negative. Then in hbar, for example, I can get .375 to display with blabel. However I really want 37.5 or sometimes 37.5%. I can only do that by tricking Stata - unless I am missing something

At 12:36 PM 6/13/2005, you wrote:

I have suggested this as a possibility privately
to StataCorp, although I have two moods about it.

In either a graph or a table, I find repeated
percent symbols to be a constant element that
should be factored out, as it were, and used
just once, for example in a row or column heading or
in an axis title.

However, it is arguable whether StataCorp
should play arbiter of elegance (for which
the historical precedents are not attractive)
whenever enough users really want something
(although vibratory patterns in graphs are
banned until the end of time).

However, I don't know exactly what Jeph means here by
conversion to string. You can use labels on
the fly, as in

... , yla(0 "0%" 10 "10%") ...

the only problem being the tedium of typing.

I'll add -prefix()- and -postfix()- options to
my -mylabels- if I sense enough interest.

Nick
n.j.cox@durham.ac.uk

Jeph Herrin

> I often work with percentages, and find it somewhat annoying that
> I have to convert numbers to strings to get them to show up with
> a %-sign. This is particularly a nusiance with graphs, where
> a histogram
> that might naturally use %s on the y-axis cannot be persuaded
> to do so without generating the frequencies first, relabeling them
> as strings with %s, and then making a two-plot. Is there a trick that
> I don't know about? Is there a reason that Stata avoids, eg,
> -format %6.1p-?
> Seems like it would be a trivial modification at some level.
>
> BTW, I use Stata 9, in case it matters.
>

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

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125     Fax (316) 263-0761
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