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

st: RE: RE: graph the percent missing fairly efficiently (forget the pie)


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: graph the percent missing fairly efficiently (forget the pie)
Date   Fri, 15 Nov 2002 18:33:00 -0000

adonlan
> 
> Thank you for the responses, which were very useful.  
> Forgive me for moving to 
> a variant question.
> 
>    What would be the simplest way to create a graph in 
> which the x-axis is the 
> name of many variables (from 10 to 100; but that is a 
> visual question), and 
> the y asix is the percent of the observations that are 
> missing.  One aspect of 
> the question (as in the prior form of the question) is how 
> to limit the degree 
> of changing the data (recoding), although it may necessary. 
>  The other aspect 
> is how to graph the percent missing. 
> 

Sorry, I think that way lies frustration only. 

Consider the results of 

. u auto 
. sort make 
. graph mpg in 1/50, by(make) bar 

noting that with this form you can _only_ 
have 50 bars, but that is not the main 
problem. The main problem is that the 
labels are completely unreadable, 
and this remains true unless you 
were to truncate the labels (in your 
case it would be the variable names) 
to say 2 characters each, and a lot 
of help that would be. 

Of course, this is also an indictment 
of Stata, which understandably and admirably refuses
to produce giraffe graphics in which 
you have twist your neck 90 degrees 
to read vertical text beneath a 
horizontal axis. 

This example is of a bar chart, 
but I believe that you would have exactly 
the same problem with any other graph 
of the form you sketch. 

Previous postings by Richard Goldstein
and myself indicate that there is no 
need to do any recoding of the data 
to tackle this question. And this is 
why I recommended the form of the 
graph I used earlier, although 
it would still be difficult 
to read with ~ 100 variables. 

Nick 
n.j.cox@durham.ac.uk 
*
*   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