Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Retrieving random effect estimates

From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: RE: Retrieving random effect estimates
Date   Mon, 24 Jan 2011 17:00:09 +0000 (GMT)

--- On Mon, 24/1/11, Mark McCann wrote:
> it's not the predictions themselves but the
> onscreen estimates from the model table I want to extract.

Stata hardly ever maximizes with respect to standard deviations
or correlations. Instead it usually transforms those parameters
such that all negative and positive numbers represent valid 
values. For standard deviations it usually takes the logarithm,
while for correlation it usually takes the Fisher's Z
transformation. Moreover, these coefficients are usually in their
own "equation", you can see those if you type -matrix list e(b)-
after you estimated your model. The names are not very intuitive
but with some trial and error, you can recover these values as

*-------------------------- begin example --------------------------
webuse nlswork, clear
xtmixed ln_w grade age c.age#c.age ttl_exp tenure ///
        c.tenure#c.tenure || id: tenure, cov(unstruct)

matrix list e(b)
di "standard deviation of coefficient of tenure " [lns1_1_1]_b[_cons]

// the inverse of the Fisher's z transformation is in Stata implemented
// as -tanh()-
di "correlation between random effects" tanh([atr1_1_1_2]_b[_cons])
*--------------------------- end example ----------------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

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


*   For searches and help try:

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