Announcement

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

  • Create Barplot also showing CI-Intervals

    Hi,
    I want to create a barplot as I have found it in an article by Almond and Edlund (2008). It shows the number of observations and and the mean ratio together with the 95% confidence invervals.
    Does anybody know the command for such a diagram? And how do I add the red line at certain values?

    Thanks for any suggestions.
    Attached Files

  • #2
    Almond and Edlund (2008): Please note our long-standing request in the FAQ Advice https://www.statalist.org/forums/help#references to avoid minimal name (date) references. The presumption that everyone knows the literature you do won't stand up to analysis.

    These horrible graphs are much discussed and dismissed in various places, including this forum. Search words for that discussion include detonator, dynamite and plunger plots. I can't bear to write code for what I think is a bad idea, but be advised that some combination of twoway bar and twoway recap would be needed,

    If sample sizes, means and CIs are all that is available, the bar doesn't have any rationale over a point or market symbol.

    Comment


    • #3
      Hi Nick,

      thanks for the reply! I will search for discussions on such graphs and maybe reconsider.

      Best,
      Nik

      Comment


      • #4
        In case you do not reconsider, I wrote a tutorial at some point on how to draw those CIs if you don't have the values in your dataset ("immediate arguments"), this might help you on your way if you don't get there using twoway rcap (the -recap- Nick refers to is a typo I think).

        Edit: Hah, I just checked and apparently I even show how to do it used rcap as a starting point :D
        Last edited by Jesse Wursten; 18 Jan 2019, 06:28.

        Comment


        • #5
          Jesse Wursten is correct. That was a typo. Sorry for any confusion.

          Comment


          • #6
            Thanks for the suggestion Jesse.

            I found a very thorough explanation on how to add error bars to a bar graph here:

            https://stats.idre.ucla.edu/stata/fa...th-error-bars/

            However, I don't know how to utilize the output of several sub-sample ratios
            Code:
            ratio FirstChild: k1sex0/k1sex [pweight=wf]
            as input for the bar plot.

            I will probably do it with Excle

            Comment


            • #7
              Hi, i am new and wanted to create this chart with different groups and countries, year and one variable (gdp). Can any one give me hint please?
              Attached Files

              Comment


              • #8
                Please read the FAQ. There you'll find how to share graphics, data, output, results, etc. You may wish to start a new thread if the topic a) is different from this thread; b) wasn't found in previous threads. Please be aware, as also explained in the FAQ, that many forum members prefer not to open files like the one you shared, basically for safety reasons.
                Best regards,

                Marcos

                Comment


                • #9
                  Nik Mayer In this thread there is a discussion on the topic. Also, my suggestion in #5 to use - serrbar - command instead.
                  Best regards,

                  Marcos

                  Comment

                  Working...
                  X