Announcement

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

  • -asobserved- graph in marginsplot following meologit, legend has different green shades.

    q1. does anyone know what the -asobserved- graph means? I suspect it's a combination of both procedure=0 and procedure= 1.
    How do i get rid of it?

    q2. Why is my legend outcome1 (green) different to the green showing in the graphs when I'm using the same code: dkgreen


    Code:
    meologit q1_ i.procedure##pre_postno || ptid:, vce(robust)
    
    margins procedure# # pre_postno
    marginsplot, by(procedure) plot1opts(lcolor(dkgreen) mcolor(dkgreen)) ci1opts(lcolor(dkgreen)) plot2opts(lcolor(orange_red) mcolor(orange_red__ ci2opts(lcolor(orange_red)) plot3opts(lcolor(cranberry) mcolor(cranberry)) ci3opts(lcolor(cranberry)) plot4opts(lcolor(sienna) mcolor(sienna)) ci4opts(lcolor(sienna)) plot5opts(lcolor(blue) mcolor(blue)) ci5opts(lcolor(blue)) plotregion(margin(large)) ylabel(.1(.1).5) legend(order(1 "Outcome 0" 2 "Outcome 1" 3 "Outcome 2" 4 "Outcome 3" 5 "Outcome 4") rows(1) post(6)) scheme(white_jet)

    Click image for larger version

Name:	Screenshot 2024-03-01 at 15.34.44.png
Views:	1
Size:	939.2 KB
ID:	1745192

  • #2
    For #1, see page 29 of the PDF manual entry of marginsplot: https://www.stata.com/manuals13/rmarginsplot.pdf. This is the second time you are asking about #2 (https://www.statalist.org/forums/for...or-as-my-lines). Refer to FAQ Extra Advice #1.2 on repeating the same question. What you should work on is to provide a reproducible example of your problem to increase your chances of obtaining a helpful reply (details in FAQ Advice #12).
    Last edited by Andrew Musau; 01 Mar 2024, 10:15.

    Comment


    • #3
      Hi thanks for your kind reply

      (1) I have seen the pdf manual but it gives ‘as observed’ results when I want them hidden, is that possible ? From the pdf manual it seems it isn’t

      (2) No the question is different, I asked about the color about the symbol marker, which I have now changed and have matching symbol colors. However, I don’t under why the legend outcome 0 is not matching the line color when its the same code -dkgreen-

      Comment


      • #4
        Originally posted by Rose Matthews View Post
        I have seen the pdf manual but it gives ‘as observed’ results when I want them hidden, is that possible ?
        I am sure it is, but there is still no data example.

        Comment


        • #5
          Hello again, I just tried the following using the advice on this thread

          [/CODE]
          Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	44.1 KB
ID:	1745605

          meologit q1_ i.procedure##pre_postno || ptid:, vce(robust)
          margins procedure# # pre_postno
          marginsplot, by(procedure)

          plot2opts(lcolor(none) mcolor(none) ci2opts(col(none))
          plot3opts(lcolor(none) mcolor(none) ci3opts(col(none))
          plot4opts(lcolor(none) mcolor(none) ci4opts(col(none))
          plot6opts(lcolor(none) mcolor(none) ci6opts(col(none))
          ylabel(.1(.1).5) legend(order(1 "Outcome 0" 5 "Outcome 1" 7 "Outcome 2" 8 "Outcome 3" 9 "Outcome 4") rows(1) post(6)) scheme(white_jet)
          [/CODE]

          This did not plot the points in the -asobserved section - but still produced the graph ?

          How can I modify the graph to omit completely, I have followed the advice on the above thread

          I am now trying the following:

          Code:
          margins procedure#pre_postno
          -- Apparently this may omit the as observed, but I've got another 2hrs until the output is generated

          Any thoughts on how to modify the code let me know

          Comment

          Working...
          X