Bookmark and Share

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

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

st: Odds ratio graph

From   Maarten Buis <>
Subject   st: Odds ratio graph
Date   Thu, 15 Dec 2011 10:56:45 +0100

--- Adriana Dornelles wrote me privately:
> I really appreciate the code that you made available about the Odds Ratio Graph.
> However, I want to graph showing only a few odds ratios , but I figured that even
> after dropping some "axis" observations, they are still showing on the graph,
> since they belong to the logit regression.
> I also tried to edit it from the graph editor, going to axis proprieties, axis rule,
> edit or add individuals ticks and tables, but because they have a (+) signal it
> does not allow you to drop this ticks (labels).
> Do you have any suggestion?
> In your graph you have south, married, never_married, collgrad. What if I would
> like to graph only south, married and collgrad?

Follow up questions need to be sent to the statalist and not to
individual members. This is exaplained in the Statalist FAQ:

You need to drop the observations representing the variables you want
to exclude before you call -egen axis = axis(estimate), label(parm)-:

*-------------- begin example -----------------
sysuse nlsw88, clear
logit union married never_married collgrad south
parmest, norestore eform
keep if inlist(parm, "south", "married", "collgrad")
egen axis= axis(estimate), label(parm)

 twoway scatter   axis estimate, ///
            xline(1) ylab(1/3, valuelabel angle(0)) ||    ///
       rcap min95 max95 axis, horizontal               ///
            legend(order(1 "point estimate"            ///
                         2 "95% conf. int.") pos(6))   ///
            xtitle("odds ratio") ytitle("")
 *--------------------- end example ---------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

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