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: RE: Retrieving random effect estimates


From   Mark McCann <mark.mccann@qub.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: Retrieving random effect estimates
Date   Tue, 25 Jan 2011 10:34:00 +0000

Excellent Maarten, I should be able to get it from here. Thanks for this!


	Regards,
		Mark


Date: Mon, 24 Jan 2011 17:00:09 +0000 (GMT)
From: Maarten buis <maartenbuis@yahoo.co.uk>
Subject: Re: st: RE: Retrieving random effect estimates

- --- 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
follows:

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


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