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: Odds ratio graph
From
Jörg Eulenberger <[email protected]>
To
[email protected]
Subject
Re: st: Odds ratio graph
Date
Tue, 14 Sep 2010 12:59:10 +0200
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/