Announcement

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

  • Graphing confidence intervals for twoway scatter

    Following this tutorial, one can graph:

    Code:
    logit hiqual avg_ed 
     predict yhat1   
     twoway scatter yhat1 hiqual avg_ed, connect(l i) msymbol(i O) sort ylabel(0 1)
    I would like to graph the confidence intervals as well. I know of the lfitci option for graph twoway, but couldn't find anything for twoway scatter. How would one proceed here?

  • #2
    You have to use predict again to get appropriate variables for upper and lower bounds. There is no way that scatter understands where what it is plotting came from.

    Comment


    • #3
      Thanks. Following your suggestions, I followed this website: http://www.stata.com/support/faqs/st...nce-intervals/
      I now have two variables, plb and pub which are the lower and upper bounds. I am wondering however, how can I now integrate these variables in the twoway scatter graph?

      Comment


      • #4
        They are just more variables to show with lines. If you want a smoother curve, you may have to jump to twoway mspline

        Comment


        • #5
          Originally posted by Jonas Wereld View Post
          I am wondering however, how can I now integrate these variables in the twoway scatter graph?
          On a very basic level, you can just add a second plot to the twoway, say rcap for instance.
          Code:
          twoway (scatter yhat1 hiqual avg_ed) (rcap plb pub avg_ed)

          Comment

          Working...
          X