Announcement

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

  • Error bars on graph bar graphs

    Hello,

    I am creating some very simple bar charts in Stata and am in need of error bars (either range or SD) on them. I am plotting the mean rugosity of two different types of coral reef (shifting and recovering) against one another for different years.

    The code I am using to create the initial charts is this:

    graph bar shifted recovering, over(year) exclude0 ysc(r(1)) yla(1(0.2)1.8)

    Is there a fairly straightforward way to add error bars to this chart?

    Many thanks,



  • #2
    There have been several similar requests. See, for example, https://www.statalist.org/forums/for...dence-interval.
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment


    • #3
      Emi: As the thread linked by Carole J. Wilson discusses the kind of graph I think you're asking for is arguably very poor at giving information and has often been criticised not only for that but also for often being misleading.

      As you know, I am loosely familiar with your kind of data and (immodesty aside) have to suggest stripplot from SSC for showing all your data together with bars showing confidence intervals for the mean.

      Comment


      • #4
        Hi both,

        Carole - thank you for pointing me to this suggestion thread!

        Nick, oh yes completely forgot about stripplot and that I had previously used that, especially on my coral data. Thats a great idea, especially for being more transparent with the data. Thank you for the reminder!

        Comment

        Working...
        X