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: esttab and xtmixed


From   Carsten Sauer <carsten.sauer@uni-bielefeld.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: esttab and xtmixed
Date   Mon, 16 Jan 2012 09:57:00 +0100

Hey Karen,
try this example:

webuse nlswork, clear
eststo: xtmixed ln_w grade age  || id:
eststo: xtmixed ln_w grade age  || id: grade
eststo: xtmixed ln_w grade age  || id: grade age
esttab, wide se transform(#*: exp(@) exp(@)) equations(2:3:4, .:2:2 , .:.:3, 3:4:5) stardrop(#*:)

Best, Carsten


Am 16.01.2012 03:56, schrieb klrobson@yorku.ca:
Thanks for this reply. I've been trying this for hours and apologies if I'm
sounding rather dense, but I just can't crack it. The first model is a null
model, the second adds a random intercept and the third adds a random slope.



Unaltered (apart from the log transformations), my table comes up like this
after
esttab eq* ,se nostar transform(ln*: exp(@)^2 exp(@)^2 at*: tanh(@)
(1-tanh(@)^2))


---------------------------------------------------
                       (1)          (2)          (3)
              standardre~g standardre~g standardre~g
---------------------------------------------------
standardre~g
centescs                         0.344        0.344
                               (0.0100)     (0.0100)

female                           0.404        0.402
                               (0.0154)     (0.0179)

_cons             -0.0272       -0.203       -0.204
                  (0.0291)     (0.0247)     (0.0260)
---------------------------------------------------
lns1_1_1
_cons               0.280        0.177       0.0255
                  (0.0117)    (0.00789)    (0.00400)
---------------------------------------------------
lnsig_e
_cons               0.756        0.663        0.658
                 (0.00455)    (0.00402)    (0.00404)
---------------------------------------------------
lns1_1_2
_cons                                         0.198
                                           (0.00959)
---------------------------------------------------
atr1_1_1_2
_cons                                        -0.441
                                             (0.110)
---------------------------------------------------
N                   14170        13995        13995
---------------------------------------------------



What I want is for the 0.025 and the 0.198 in the last column to switch places.
0.198 is the random slope but is called lns1_1_2_cons in the third estimation
because this is how xtmixed automatically orders the output. The var(constant)
has been pushed down two rows in the third column due to this naming
convention.

I know at this rate I'd be better off to just copy and paste, but this has been
bugging me for some time and I won't rest til it is solved...

Please estout gurus, spell it out for me in painful detail. I'm weary from
frustration.

Karen




Quoting Carsten Sauer<carsten.sauer@uni-bielefeld.de>:

You could use the equations option which is described in help estout
(and can be used with esttab).
Use the transform option like - transform(#*: exp(@) exp(@)) - to unlog
variances.

Carsten



Am 15.01.2012 03:17, schrieb klrobson@yorku.ca:
Dear Statalist

I am having what seems like a simple problem that I cannot solve. I have
multiple xtmixed estimations that I want to present in the same table.


xtmixed y x1 x2 || id:, mle
estimates store a1
xtmixed y x1 x2 || id: x1, covariance (unstructured), mle
estimates store a2
xtmixed y x1 x2 || id: x1 x2, covariance (unstructured), mle
estimates store a3
esttab a*

The problem is that in the random coefficient models, the ordering of the
lns1_1_1 changes meaning/order once random intercepts are added to the
model.
In the first model lns1_1_1 is the random intercept variance, but in the
second
model, it is the random slope variance for x1. Plus variance parameters
need to
be "unlogged".

I know how to create tables separately for the different estimations, but I
just
want to create one giant table in one fell swoop where all the parameters
are on
the right lines. I've messed around with scalars and macros but it seems
like
there must be something easier that I've overlooked.

Any help greatly appreciated.

KR


----- End forwarded message -----


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

Carsten Sauer
SFB 882 "Von Heterogenitäten zu Ungleichheiten"
Teilprojekt A6 "Die Legitimation von Ungleichheiten - Strukturelle
Bedingungen von Gerechtigkeitseinstellungen"
Fakultät für Soziologie
Universität Bielefeld
Postfach 10 01 31
33501 Bielefeld
Tel.: 0521 106-67291/-6948 (Sekr. Frau Fischer)
Fax: 0521 106-6479

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

--

Carsten Sauer
SFB 882 "Von Heterogenitäten zu Ungleichheiten"
Teilprojekt A6 "Die Legitimation von Ungleichheiten - Strukturelle Bedingungen von Gerechtigkeitseinstellungen"
Fakultät für Soziologie
Universität Bielefeld
Postfach 10 01 31
33501 Bielefeld
Tel.: 0521 106-67291/-6948 (Sekr. Frau Fischer)
Fax: 0521 106-6479

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


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