Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: statalist-digest V4 #4588 - was Graphing
From
"Allan Reese (Cefas)" <[email protected]>
To
<[email protected]>
Subject
st: RE: statalist-digest V4 #4588 - was Graphing
Date
Tue, 24 Jul 2012 11:22:01 +0100
The answers offered to Aminu may be helpful but they appear to ignore
the contradiction in the question as posed:
[Aminu] I have a qualitative data where 8 diseases ranked (1
(most-important) to 5 (least important)) based on perception - 37
subjects were interviewed so 37 records in the dataset.
It appears the diseases were not *ranked* but *graded*, an important
distinction. If ranked, only one disease can be first for each person,
and the ranks would run 1-8. If graded, could one person think all
eight had the same importance? Before offering code to draw specific
graphs, it is necessary to know the intended use of the graph (analysis
or presentation); if the latter, what message is it intended to convey?
For example, a slide to make the point "everyone thinks this disease is
important, but this one is considered trivial" might well use eight
stacked bars and vivid colours.
[David Hoaglin ] "A key message is that stacked bars are generally a bad
idea. You would do better with a little histogram for each disease (5
bars, each sitting on the horizontal axis) and no numbers on top.
"This approach has the advantage that the 8 bars for each rank, though
not adjacent, have a common baseline."
[AR] 8 histograms side by side may be less easy to compare than 8
stacked vertically in a trellis. This is like comparing "profiles" in
correspondence analysis. Rather than take authoritarian advice, Aminu
might try both and see which conveys the intended message. This may be
culturally dependent (relating to direction of reading) and I think
Aminu in is Nigeria.
[Nick Cox] My bottom line is that stacking is often chosen, but rarely
optimal. One disadvantage of stacking is that it imposes dependence on a
key or legend.
[AR] I'll agree with Nick that random choices from a "graphics gallery"
are often confused and confusing. Stacked bars often fail because the
author didn't think about the order of stacking - Excel stacks values in
alphabetic order of labels. Stata makes it easy to choose the order and
here the values are inherently ordered, so reference to a legend is less
problematic. Since the values for each reply are discrete (no of 1s, no
of 2s etc), another option is a line chart for each disease, so the
slope between values helps the visual comparison of "profiles".
I'll guess the data were input as 37 cases with a variable for the
importance of each disease. If -reshaped- as 37*8 cases with
subject/disease/importance as variables, -tab disease importance- gives
the table of counts that the graph is intended to illustrate. Hence one
can do some analysis before drawing a graph to present the findings.
Allan
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/