Announcement

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

  • forest plot, x axis not correlating with values on the graph

    Hi I produced a forestplot using the code below

    Code:
    logit death i.treatment var1 var2 var3 [pw=_weight_, or
    estimates store m1
    
    //odds ratio 0.25
    
    logit death1y i.treatment var1 var2 var3 [pw=_weight_, or
    estimates store m2
    
    //odds ratio 0.68
    
    
    //Forest plot
    coefplot m11||m12, drop(_cons var1 var2 var3 *.var2) by coefs xline(1) xtick(-2(0.5)2) xlabel(-2(0.5)2) scheme(white_jet) xtitle(Odds rtio for treatment) yaxis(1 2) ylabel(1"Death" 2"Death 1yr", axis(2) angle(0)) title("",axis(2)) ylabel (1 "p=0.07" 2"p=0.06", axis(1) angle(0)) note("Death Outcomes")
    As you can see from the image produced that that values on the x axis do not correlate with the results from the odds ratios -as you can see for the 1 yr it gives a negative odds ratio which is not the result
    What am I doing wrong pls?
    ***update I think I found the solution - can't delete the post,

    Just to say, I forgot to add *eform* just before xtitle TO EXPonentiate the results.
    Last edited by Martin Imelda Borg; 16 Nov 2023, 07:34.
Working...
X