Statalist


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

Re: Re: st: catplot problem


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: Re: st: catplot problem
Date   Wed, 7 May 2008 15:10:23 +0100 (BST)

--- Tunga Kantarci <[email protected]> wrote:
> The problem: Now, I have variable 3, just like variable 1, which
> takes 10 values but for values 2 and 3 there are no observations.
> When I run catplot, 2 has three categories and 3 has three
> categories, etc up to 8. There are no bars for 9 and 10.
> This is the problem: the frequency that should stand for value '4'
> stands for '2' in the graph. The frequency that should stand for
> value '5' stands for '3' in the graph.  Now, if we agree on this -I
> mean if I was able to make my problem clear - this is a deficiency 
> of catplot for me: Catplot simply places the bars to the wrong
places.
> Put differently: if catplot was able to eliminate values 2 and 3 in
> the graph (because there are no observations for them) I would have
no
> problem. But instead, catplot displays values 2 and 3 on the
> horizontal axis, but the associated bars beling to values 4 and 5.
> Now, I call this deficieny, bug, etc. I don't know what you want to
> call it.

I am not able to reproduce the "bug" you are reporting. Type the
following commands in Stata:

sysuse auto
catplot bar foreign rep78

If I read your example correctly you think that the bar for foreign of
rep78 values 3 4 and 5 would all be incorrectly shifted two places to
the left because there are no foreign cars for values 1 and 2. This is
not the case whith my version of -catplot-.

-- Maarten

Ps. In general I would avoid using the words bug or deficiency, and
instead say that you where expecting command -xyz- to produce 123, but
instead it gave you 456, followed with a question of why this is
happening. Even better would be to give an example using one the
datasets available in Stata (see: -help sysuse-), that way everyone can
immediately see what you are doing and what the results of your
commands are. 



-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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