Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: Re: st: catplot problem


From   "[email protected]" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: Re: st: catplot problem
Date   Mon, 12 May 2008 07:42:43 -0700

Tunga Kantarci reported a problem with -catplot bar- on 7 May:

<http://www.hsph.harvard.edu/cgi-
bin/lwgate/STATALIST/archives/statalist.0805/date/article-287.html>

-catplot- is a user-written program by me available from SSC, and -bar-
is one of its subcommands. Bars were not labelled correctly in some of
his plots.

Various people have contributed to a diagnosis of the problem. Maarten
Buis pointed out on the list that the problem could not be reproduced
with the auto data and Tunga confirmed that it had bitten him only with
the dataset he was working with.

Vince Wiggins of StataCorp and I have dug deeper and agree that Tunga
has found a bug.

The bug is in -graph bar-, not -catplot-: -catplot- with the -bar-
subcommand is a wrapper for -graph bar-.

The bug is of a perhaps unusual kind, which helps to explain why it has
not surfaced before, to our knowledge. Tunga is using a categorical
variable with several value labels that are just blank spaces. In such
circumstances -graph bar- should ignore the value labels and concentrate
on the underlying integers, but it is not doing that.

The same bug lurks in -graph hbar- and -graph dot-.

The bug has been placed on StataCorp's to-fix list. In the mean time,
there is a simple work-around: Don't use value labels like that. Either
drop any value label that is just spaces, or define it to be meaningful.
Either way, your graphs, whether with -graph bar- or -catplot-, should
then be fine.

Nick                            Vince
[email protected]            [email protected]


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

Privileged, confidential or patient identifiable information may be contained in this message. This information is meant only for the use of the intended recipients. If you are not the intended recipient, or if the message has been addressed to you in error, do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. Instead, please notify the sender by reply e-mail, and then destroy all copies of the message and any attachments.

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