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]
st: AW: xtmelogit variance estimates, conversion to MOR, inserting MORs into xtmelogit estimates, and then replacing them: a tale of two questions
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: xtmelogit variance estimates, conversion to MOR, inserting MORs into xtmelogit estimates, and then replacing them: a tale of two questions
Date
Fri, 14 May 2010 16:37:41 +0200
<>
"... how would I retrieve the estimates for
var(_cons) from xtmelogit (I couldn't see them in the list at the end
of the help menu)"
*************
webuse bangladesh, clear
xtmelogit c_use urban age child* || district: urban, var
nlcom (var_urban: (exp([lns1_1_1]_b[_cons]))^2)
nlcom (var_cons: (exp([lns1_1_2]_b[_cons]))^2)
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Jamie Fagg
Gesendet: Freitag, 14. Mai 2010 16:29
An: [email protected]
Betreff: st: xtmelogit variance estimates, conversion to MOR, inserting MORs
into xtmelogit estimates, and then replacing them: a tale of two questions
Dear all,
I've just been experimenting with esttab and the associated commands
(estadd, estpost etc) and using to tabulate some xtmelogit models that
I've fitted in Stata 10. I've got a number of queries.
First, considering the variance estimates from the following three
level logistic variance components model :
Random-effects Parameters | Estimate Std. Err. [95% Conf.
Interval]
-----------------------------+----------------------------------------------
--
neigh: Identity |
var(_cons) | .579824 .1686844 .3278398
1.025488
-----------------------------+----------------------------------------------
--
pid: Identity |
var(_cons) | 2.55512 .3073848 2.018415
3.234537
I'd like to use the estimates to make a table which includes the
median odds ratio (MOR). Drawing on Sophia Rabe Hesketh and Anders
Skrondals (2008) and Ben Jann's helpful examples, I've added the
between-individual (pid) MOR and between-neighbourhood (neigh) MOR to
the variance components model estimates using the following:
estadd scalar bimor = exp(sqrt(2*(0.58+2.56))*invnormal(3/4)),
:BYPVarComp2
estadd scalar bnmor = exp(sqrt(2*(0.58))*invnormal(3/4)), :BYPVarComp2
I can then display the estimates using esttab
esttab BYPVarComp2, stats(bimor bnmor)
What I'd like to do now is not have to rely on automatically adding in
the variance estimates (0.58 and 2.56 in this case) to these
statements. So question 1 is, how would I retrieve the estimates for
var(_cons) from xtmelogit (I couldn't see them in the list at the end
of the help menu) and place them in the estadd statement?
Once I've added the scalars (i.e. bamor or bnmor) to the xtmelogit
estimates, I cannot then replace or delete them. So question 2 is, how
would I go about replacing them if I make a mistake in the
calculations?
Thanks for your time,
Jamie
*
* 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/