Quantcast

Odds ratio graph

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Odds ratio graph

Jörg Eulenberger
i use xtmelogit to calculate an 3 Level random intercept only model.
How can i produce an plot like this
(http://aspe.hhs.gov/hsp/08/RelationshipStrengths/Ed/fig1.gif) for the
fixed-part of my model?
Thanks,
Joerg
*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Odds ratio graph

Maarten buis
--- On Mon, 13/9/10, Joerg Eulenberger wrote:
> i use xtmelogit to calculate an 3 Level random intercept only model.
> How can i produce an plot like this
> (http://aspe.hhs.gov/hsp/08/RelationshipStrengths/Ed/fig1.gif)
> for the fixed-part of my model?

It is probably easiest when you download the -parmest- and the
-egenmore- packages from SSC. You do that by typing in Stata

ssc install parmest
ssc install egenmore

The former can be used to create a dataset containing your
estimates. The latter contain the -axis()- program that you
can use to create an axis variable that is sorted by the
estimates. Below is an example of how to combine those (and
for fun I added confidence intervals...)

*------------------ begin example ------------------------
sysuse nlsw88, clear
logit union married never_married collgrad south

parmest, norestore eform
egen axis= axis(estimate), label(parm)

twoway bar  estimate axis, base(1) horizontal barw(.5) ///
            xline(1) ylab(, valuelabel) ||             ///
       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:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


     

*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Odds ratio graph

Jörg Eulenberger

Thanks. Its great.
Jörg


Am 14.09.2010 09:44, schrieb Maarten buis:

> --- On Mon, 13/9/10, Joerg Eulenberger wrote:
>> i use xtmelogit to calculate an 3 Level random intercept only model.
>> How can i produce an plot like this
>> (http://aspe.hhs.gov/hsp/08/RelationshipStrengths/Ed/fig1.gif)
>> for the fixed-part of my model?
> It is probably easiest when you download the -parmest- and the
> -egenmore- packages from SSC. You do that by typing in Stata
>
> ssc install parmest
> ssc install egenmore
>
> The former can be used to create a dataset containing your
> estimates. The latter contain the -axis()- program that you
> can use to create an axis variable that is sorted by the
> estimates. Below is an example of how to combine those (and
> for fun I added confidence intervals...)
>
> *------------------ begin example ------------------------
> sysuse nlsw88, clear
> logit union married never_married collgrad south
>
> parmest, norestore eform
> egen axis= axis(estimate), label(parm)
>
> twoway bar  estimate axis, base(1) horizontal barw(.5) ///
>              xline(1) ylab(, valuelabel) ||             ///
>         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:
> http://www.maartenbuis.nl/example_faq )
>
> Hope this helps,
> Maarten
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
> *
> *   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/
>

*
*   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/
Loading...