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

Re: st: [Stata 9] scatter axis bug


From   vwiggins@stata.com (Vince Wiggins, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: [Stata 9] scatter axis bug
Date   Wed, 04 May 2005 17:22:07 -0500

David Airey <david.airey@vanderbilt.edu> notes that the range of axis values
from -graph twoway- exhibits "weird behavior" when one of the variables
forming a plot has a missing value where the other has a very large or small
value.  The range of the axis includes this large or small value, even though
the point is not plotted (because its associated ordinate or abscissa is
missing).

This is in fact an intended feature, though admittedly one with mixed appeal.
Unlike -plot- or -graph- prior to Stata 8, -graph twoway- does not simply
throw away all observations that have a missing value for any of the variables
being plotted.  Instead, it tracks these missing values and allows you to
either connect lines across the gaps or leave breaks in lines where missing
values occur (see the option -cmissing()-).  -graph twoway- also allows you to
specify multiple plots that might use different variables for the X- and
Y-values and those plots might involve 2, 3 or even only 1 variable.  While
you might occasionally be surprised by the range of a simple graph, we the
most consistent results would be produced by using the full range of specified
data.

We were also comfortable with the fact that you can use an -if- qualifier to
explicitly exclude observations, though Scott Merryman's <smerryman@kc.rr.com>
suggestion to use the -missing()- function is more direct than anything I had
considered.

 
-- Vince 
   vwiggins@stata.com

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