Announcement

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

  • Two types of graph at once

    Hello all,

    Is it possible to plot a line graph and a range graph at once in one graph? If so, how?

    Thank you in advance.

  • #2
    Perhaps this example taken from the output of help twoway rbar will point you in a useful direction.
    Code:
    sysuse sp500, clear
    twoway rbar high low date, barwidth(.6) color(gs7) || line close date || in 1/57

    Comment


    • #3
      Originally posted by William Lisowski View Post
      Perhaps this example taken from the output of help twoway rbar will point you in a useful direction.
      Code:
      sysuse sp500, clear
      twoway rbar high low date, barwidth(.6) color(gs7) || line close date || in 1/57
      Thanks.

      But basically what my dataset contains are coefficient values, and upper and lower confidence interval band values for each.

      What I wanted to do was in one graph, make a line graph from the coefficients and range graph from confidence intervals.

      Having to do this manually since -sqreg- and consequently -grqreg- doesn't support weights.

      Comment


      • #4
        Did you run this sample code and look at the output? Is it not a line graph combined with a range graph? If not, explain how it differs from what you seek.

        my dataset contains are coefficient values, and upper and lower confidence interval
        Even the best descriptions of data are no substitute for an actual example of the data.

        You should show example data using the dataex command. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run ssc install dataex to get it. Either way, run help dataex and read the simple instructions for using it. dataex will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

        When asking for help with code, always show example data. When showing example data, always use dataex.

        Comment


        • #5
          Originally posted by William Lisowski View Post
          Did you run this sample code and look at the output? Is it not a line graph combined with a range graph? If not, explain how it differs from what you seek.



          Even the best descriptions of data are no substitute for an actual example of the data.

          You should show example data using the dataex command. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run ssc install dataex to get it. Either way, run help dataex and read the simple instructions for using it. dataex will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

          When asking for help with code, always show example data. When showing example data, always use dataex.
          Thank you, my problem was resolved. What I was essentially looking for is -rarea-

          Comment

          Working...
          X