Announcement

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

  • Horizontal bar graph with SD

    Dear Stata users,

    I am wondering, is there anyway to create horizontal bar graph with SD using -serrbar- ?
    May anyone help me with this.

    Code:
    PHP Code:
    serrbar meanapc sdapc groupsmvopts(recast(barbarw(0.4base(0bfcolor(none)) xline(0

    Thank you so much.
    Best wishes,
    Oyun

  • #2
    We can't see your data to play with it. I rather fear that you want what is variously called a dynamite, detonator or plunger plot, but on its side. Those are search terms to find threads and references here and elsewhere on why that is a poor kind of plot to use.

    That aside, this shows some technique:

    Code:
    webuse assembly, clear 
    gen upper = mean + 2 * std 
    gen lower = mean - 2 * std 
    twoway bar mean date, horizontal bfcolor(none) base(0) || rcap lower upper date, horizontal xla(0(40)220) yla(, ang(h))
    Incidentally, I am listed generously as the author of serrbar. All that means is that for Stata 6 I made some suggestions to generalize the existing code a little, probably in reaction to questions on Statalist. There are much better graph commands to use to show your data.

    Comment


    • #3
      Dear Mr.Cox,

      Thank you so much for your kindness and help.

      I will try the below graph.

      https://www.stata-journal.com/sjpdf....iclenum=gr0045

      Comment

      Working...
      X