Announcement

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

  • Overlaying the plots instead of creating side-by-side plots.

    I figured out how to graph confidence intervals around predicted values of the regressions (dependent variable: Legislative Effectiveness Scores).

    So, I can produce the following graph using the command:
    .twoway lfitci les seniority if yfe>1993, by(gk104)


    I would love for this to be part of one graph instead of side-by-side graphs.

    Do you know if it’s possible to do this?

    Thanks!

    sean

  • #2
    How many categories in gk104? This sounds like a prescription for a hard-to-read image.

    Comment


    • #3
      Just 2!

      Comment


      • #4
        This is what the side-by-side looks like.
        Click image for larger version

Name:	Unknown.png
Views:	1
Size:	44.2 KB
ID:	1731516

        Comment


        • #5
          So, it is something like

          Code:
          twoway lfitci les seniority if yfe>1993 & gk104 == 0 || lfitci les seniority if yfe>1993 & gk104 == 1, legend(order(1 "0" 2 "1"))
          for your own values of 0 and 1, as it were.

          Comment


          • #6
            I agree with Nick, but transparency may help here.

            Code:
            sysuse auto, clear
            set scheme s1mono
            *BY GRAPH
            twoway lfitci mpg weight if rep78>2, by(foreign, leg(off) note("")) saving(gr1, replace) fc(red%20)
            
            *COMBINED
            separate mpg, by(foreign) veryshortlabel
            twoway lfitci mpg0 weight if rep78>2, fc(blue%20)||lfitci mpg1 weight if rep78>2, subtitle(Combined) saving(gr2, replace) fc(red%20) leg(off)
            
            gr combine gr1.gph gr2.gph
            Click image for larger version

Name:	Graph.png
Views:	1
Size:	48.4 KB
ID:	1731519

            Comment


            • #7
              Thanks, Nick and Scott! With your help, here's what I've produced... I appreciate you taking the time to help me out!

              Comment


              • #8
                Again, thanks!
                Click image for larger version

Name:	Screenshot 2023-10-25 at 9.46.51 PM.png
Views:	2
Size:	62.1 KB
ID:	1731572
                Click image for larger version

Name:	Screenshot 2023-10-25 at 9.46.51 PM.png
Views:	2
Size:	62.1 KB
ID:	1731573

                Comment


                • #9
                  I would try a quadratic model too.

                  Comment

                  Working...
                  X