Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: How to graph odds ratio and CI?


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: How to graph odds ratio and CI?
Date   Sat, 30 Dec 2006 05:52:48 -0000 (GMT)

Bill Lord wrote:

> I am a new user of STAT 9 who is trying to graph results of a logistic
> regression showing the effect that duration of pain has on decision to
> administer analgesia. The results show that the longer a person has pain,
> the less likely they are to receive analgesia.
>
> On the x axis I need to show 4 categories of pain duration, and on the y
> axis I need confidence intervals and odds ratios for no-analgesia using a
> box plot. Any help would be much appreciated. Bill.

Roger Newson's user-written -eclplot- package, downloadable by SSC, should
be just the solution for you. Try this, which is used in conjunction with
two more of Roger's user-written packages, -parmby- and -sencode-:

. webuse union, clear
. parmby "xi:logit union age i.grade south black, or", label norestore
. sencode label, gene(parmlab)
. eclplot estimate min95 max95 parmlab, hori eplot(scatter)

It's not the most sensible example, for sure, but this seem to do exactly
what you want. Hope that helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index