Statalist


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

st: SV: -spineplot- available from SSC


From   "Peter Jepsen" <PJ@DCE.AU.DK>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: SV: -spineplot- available from SSC
Date   Tue, 30 Oct 2007 20:51:31 +0100

Thank you, Nick et al. I've got a feature request! I find that I want to add text to some of the squares, preferably in the middle. I was hoping that I could modify the code myself to superimpose a scatterplot with -mlabel(mytextvar)- and -mlabpos(0)- but I can't get the coordinates for the centres of the squares. I can see from the ado-code that the centre on the x-axis ("xmid") is computed, but I don't know how to get the "ymid". So, I kindly as you to consider adding this feature. 

Best regards,
Peter.

-----Oprindelig meddelelse-----
Fra: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] På vegne af n j cox
Sendt: 28. oktober 2007 22:49
Til: statalist@hsphsun2.harvard.edu
Emne: st: -spineplot- available from SSC

Thanks to Kit Baum, a -spineplot- package for spine plots
is now available from SSC. Stata 8.2 is required. Use -ssc-
to install.

There is no connection between spine and spline, even though
one otherwise excellent book discussing spine plots writes consistently 
of spline plots (in its first printing only). Spine plots are for 
visualising categorical data.

This package grows out of a thread started by Matthias Schonlau
on 16 October. Scott Merryman and Maarten Buis also contributed
to the thread. The package on SSC supersedes code earlier
posted on Statalist, which was for Stata 9. I've pushed things
back to 8.2 by using -levels- rather than -levelsof-. -spineplot-
will fall over in 8.2 if presented with a categorical variable
that is not defined by integers, because -levels- does. As this is a 
dubious thing to do any way, and as the limitation was removed in 9,
this potential problem is not documented.

If you don't know what spine plots are, you are probably in very
good company. The term only seems to have been introduced in 1996
and to have begun spreading around 2000. Spine plots are special
cases of mosaic plots. Although yet to reach general texts,
and even most texts on categorical data analysis, spine plots
can be a simple and effective alternative to conventional bar
charts. By using bars of variable width, they give another
visual take on categorical data.

The help file gives several detailed references, ranging from
early historical examples of spine plots avant la lettre to
more recent references. In addition to the usual comments about
apparent bugs and/or limitations, I would appreciate any interesting
further references, including any mentions in mainstream texts.

I should perhaps flag for clarity that I have no ambitions
to generalise this program to mosaic plots for an arbitrary
number of variables, which I generally find (far) too complicated to
read (easily). Judging from Andrew Gelman's blog, I
am not the only one.

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/

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