You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
What do the stacked bars represent? Proportion of responses in each category (e.g., brown=strongly disagree, peach=disagree somewhat, blue-gray=neither agree nor disagree, light blue=agree somewhat, blue=strongly agree)?
Why are they offset to different positions along the x-axis? Nonresponse?
It looks as if the graphs are centred (centered) on the middle category. slideplot from SSC, a command from 2003. does almost everything that graph does, except for that centring. Writing an alternative using graph twoway has been on my mind for about 5 years, but usually I use tabplot from the Stata Journal instead.
In Stata, some mix of twoway bar and twoway rbar would get you what you want.
As was discussed before. Several solutions are discussed here and here. Also Ben Jann's paper 'Tabulation of multiple responses', that was published in The Stata Journal (2005 Vol. 5 ,1, 92-122) offers solutions to your 'check box question' and is downloadable here. You should also consider coefplot, discussed in another paper from Ben Jann, which is downloadable here.
That's an old idea given a strong boost by some recent advocates. I try to maintain an open-minded attitude of encouraging whatever works best for your data and your purposes
For those users who visit this post and might be unaware, note that Nick published the module floatplot (29 May 2021, but now in version 1.0.3, 31 October 2022):
to draw floating or sliding stacked bar plot - floatplot produces a floating or sliding stacked bar plot showing percents (or optionally proportions or frequencies) of categories of a numeric outcome variable numvar by zero, one, or two other categorical variables. The plot is most helpful if categories of an outcome variable have a natural or conventional pre-defined order. Although there is no formal check, the design of the plot tacitly assumes a modest number of distinct categories, say between 2 and 9. The commmand is a wrapper for a call to twoway rbar for showing bars and twoway scatter for showing text.
It can be installed by using this code:
Code:
ssc install floatplot , replace
The examples in the help demonstrate how to create a floating or sliding stacked bar plot for frequencies, proportions, or percents. Very useful indeed to visualize the so-called Likert scale response variables also over categories.
Note that the above is also discussed in this post.
Comment