Announcement

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

  • Bar chart question

    Sorry this might be elementary, but honestly I struggled finding the answer by looking at manuals.

    Here is what I am looking to plot:

    Column1. Column2: John et al Column2: Mary et al
    Lower range. 10. NA
    Upper Range. 20. NA
    Value NA 15
    Benchmark 18 NA

    I am trying to summarize the values used in the literature for a specific variable, preferably in a bar chart. Some papers use a range, with a benchmark value. Some only use a range. Some do not use a range, and use one value only.
    And I would like to summarize this.

    Ideally the range values would be a bar that start at the low range and end at max. If there is a benchmark, this can be illustrated with an X.
    Importantly: Is there is no range, and just one value, I would like this bar to be of a different color so it is not misunderstood as range. Although this last point can be done from the figure editor itself.

    Your thoughts are much appreciated.

    Thanks





  • #2
    Bar charts are surprisingly puzzling for beginners, which means all of us, as you need to work out when to use graph bar and when twoway bar. Here it will be the second, or something similar, but the details need to wait for a more nearly readable and intelligible data example. Please consult https://www.statalist.org/forums/help#stata as always. For example, NA is no kind of numeric value in Stata.

    Comment


    • #3
      I managed to find a solution using
      graph twoway rbar
      My problem, was that I wanted to plot ranges for different students but for some students only values were available (and not ranges). I figured a sub-optimal way to solve this, but that does the job. I used a tiny range when a range is missing. For my purposes this was sufficient.
      Thank you.

      Comment

      Working...
      X