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]

Re: st: Re: Odds ratio graph - selecting order of bars


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Re: Odds ratio graph - selecting order of bars
Date   Tue, 9 Jul 2013 22:47:49 +0100

The tabulation just shows the estimates. It is not needed for the graphics.

Nick
njcoxstata@gmail.com

On 9 July 2013 22:41, Michael Stewart <michaelstewartresearch@gmail.com> wrote:

> I am reffering to  http://www.survey-design.com.au/Stata%20Graphs.html
>  , Odds ratio graph - selecting order of bars
>
> I cant understand the utility of "tab estimate, gen(kk)" command .I am
> getting the same result with and without that command .
>
> The commands are as follows
>
> **********example begin*********
>
> sysuse nlsw88, clear
> logit union married never_married collgrad south
>
> parmest, norestore eform
>
> tab estimate, gen(kk)
>
> //order of bars
> input a
> 1
> 2
> 3
> 4
> 5
>
> egen axis= axis( a estimate), label(parm)
>
> twoway bar  estimate axis, base(1) horizontal barw(.5) ///
> xline(1) ylab(, valuelabel angle(0)) ||                ///
> rcap min95 max95 axis, horizontal                      ///
> legend(order(1 "point estimate"                        ///
> 2 "95% conf. int.") pos(6))                            ///
> xtitle("odds ratio") ytitle("") scheme(color)
>
> **********example end*********
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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