Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • twoway bar stacked bars?

    I am using "twoway bar pass mdate, barw(0.75) || rbar pass watch mdate, barw(0.75) || rbar watch specialmention mdate, barw(0.75) || rbar specialmention substandard mdate, barw(0.75)"

    to stack several bars I am using the twoway vs bar command due to the need to add a connected line in the graph as well, but for some reason the bars are not being stacked...a little lost in here
    Last edited by Gerald Gjini; 09 May 2014, 14:33. Reason: twoway

  • #2
    twoway rbar low high date (e.g.) just draws bars from low to high; it doesn't do arithmetic to add any of the variables mentioned to any other variables mentioned in other commands.

    Suppose a, b and c are all zero or positive and you want to stack their cumulative sums. You could start with bars for a, but you also need to calculate

    Code:
     
    gen B = a + b 
    gen C = a + b + c 
    twoway bar a date || rbar a B date || rbar B C date
    Please use full real names on Statalist. Use the Contact Us on the home page to give the administrators, your full real name, e.g. Gerald Ford.

    Comment


    • #3
      Thank you Nick. will do.

      Comment

      Working...
      X