Announcement

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

  • Renaming models in -coefplot-

    Click image for larger version

Name:	A4D45BE6-E19C-4AF8-BEEA-546132C58D0B.png
Views:	1
Size:	36.2 KB
ID:	1731139
    I have the above graph produced via multiple models via coefplot



    Code:
     
     Logistic outcome1 treatment price estimates store outcome1 logistic outcome2 treatment price estimates store outcome2 logistic outcome3 treatment price estimates store outcome3  coefplot outcome1 || outcome2 || outcome3, drop(_cons price) bycoefs xtitle(Odds ratio of treatment) 1.386 "4")
    Is there a way I can rename the 'outcome1', I tried

    Code:
    Code:
     coeflabels(outcome1="Myocardial Infarction")
    However this didn't work, I suppose as this is for coefvariables
    I then tried a shortcut to rename my models as the variables I want to see in graph.

    I managed to get away with most variables renamed by storing the models as -estimates store MI-

    The only limitation is that a model name such as : VTE&PE is not accepted by stata

    Question 1:
    Do you have any suggesstions?

    Question 2:
    Do you have an idea if I can add the p-values; at outcome1 or is the only alternative to add as notes?

  • #2
    Code:
    help axis_label_options
    for #1. Provide a reproducible example for anything more.

    Comment


    • #3
      For future reference find attached below the code:

      Code:
      coefplot outcome1 || outcome2, drop(_cons price) bycoefs xtitle(Odds ratio of treatment) xlabel(-.693 "0.5" 0 "1" .693 "2" 1.386 "4") yaxis(1 2) ylabel(1 "Mi" 2 "UTI", axis(2) angle(0)) ytitle("", axis(2)) ylabel (1 "p = 0.05" 2 "p=0.06", axis(1) angle(0))note("side effects in 30 days")

      Comment

      Working...
      X