Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to plot ORs and CI - results of a logistic regression


From   Sofia Ramiro <[email protected]>
To   Statalist <[email protected]>
Subject   st: How to plot ORs and CI - results of a logistic regression
Date   Sun, 1 Jul 2012 19:13:27 +0100

Dear Statalist members,

I am trying to plot the results of a logistic regression. I would like to have a graph with the ORs and 95%CI plotted. 
On the y-axis I would like to include the label of the variables names and, ideally (if possible), I would like to add, on the right hand side of the graph, the ORs and 95%CI written (just as we see for the forrest plots in a meta-analysis). 
Having reviewed what as been written on this topic on statalist, this is what I did:

logistic asdasimprov3M1 asdascalc male num_anos_escolaridade eva_total_colunaconvhighlow4 
parmest, norestore eform
egen axis= axis(estimate), label(parm)
twoway scatter   axis estimate, ///
            xline(1) ylab(, valuelabel angle(0)) ||    ///
       rcap min95 max95 axis, horizontal               ///
            legend(order(1 "point estimate"            ///
                         2 "95% conf. int.") pos(6))   ///
            xlabel(0(1)8) xtitle("Odds Ratio") ytitle("")

My problems are:
- On the y-axis I get the variables' names, but they are abbreviated names for my own use - how do I manage to put there labels - eg instead of male, I would like to have "Male gender (vs. female)" ?
- Is it to possible to create a column on the right hand side of the graph where the ORs and 95%CI are written (in addition to being ploted in the graph)? If yes, how?

thanks!

Sofia
 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index