Hello Statalis,
I have done a conjoint experiment survey, where respondents were asked to choose between two random profiles.
I would like to display some of these decisions in a stacked bar chart, but I just did not find a way to do it the way I imagine it, but maybe it is impossible anyways, which is why I am now asking here.
So I have three "battle" variables, BYvO (Choice between young and old profile; value: 1=young 2=old), BYvM (Choice between Young and midage profile, value: 1=young and 2=midage) and BMvO (Choice between midage and old profile, value 1=midage 2=old).
For each variable isolated I can create charts like the following (percentage means n% chose old profile in decision between young and old profile)
The following catplot was installed with relatively easy code: "catplot BYvO, percent asyvars stack" Array
I've done that with the other variables as well and then tried to combine them using
"catplot BYvO, percent asyvars stack saving(bar1)
catplot BYvM, percent asyvars stack saving(bar2)
catplot BMvO, percent asyvars stack saving(bar3)
graph combine bar1.gph bar2.gph bar3.gph, ycommon commonscheme"
Array
but that creates just these three different charts, so I want to know if I can put them into one graph with the same axis and different labels for each bar.
What I had in mind (sorry for bad drawing): Array
Thank you very much for your help!
Tristan
PS: Sorry I tried to make the images smaller, but it won't save it that way
Related Posts with Creating a stacked bar chart for 3 different variables
Generating confidence intervals using a line graphI have run a difference-in-difference regression and want to make a line graph to illustrate my resu…
How do I construct an index based on imputed variables using Stata? Hi all, I am looking to construct an index (ranging from 0 to 1) describing how positively the sur…
-xtoverid- or Variable Addition Test (VAT)Dear community, after having found heteroscedasticity and autocorrelation in my panel data, I accou…
Generate binary variable from string variable contentsIs there a way to generate a variable based on a string variable that contains numbers in a list? Fo…
How to display a descriptive table for all items of an item set, presenting percentages for each response category?Dear all, I am stuck at a problem, although the solution should be straightforward. I have several…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a stacked bar chart for 3 different variables
Post a Comment