Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Variance parameters in postestimation commands


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: Variance parameters in postestimation commands
Date   Thu, 7 Jun 2007 10:29:21 +0200

--- Arne Mastekaasa wrote:
> I know how to access coefficient estimates in postestimation commands
> such as -test-, but I've not been able to find out how to do this with
> estimated variance parameters, e.g. from -xtmixed-.

These are typically stored in the vector of parameters e(b). I 
never remember the equation name under which they are stored so 
I always first use -matrix list e(b)- to see the entire vector 
with names and than figure out which parameter I need. One more 
tricky thing is that Stata typically doesn't maximize the 
likelihood with respect to the standard deviation (which is 
bounded to be larger then zero) but with respect to 
ln(standard deviation) (which ranges between -infinity and 
+infinity). See the example below:

*----------- begin example -------------
use http://www.stata-press.com/data/r9/pig.dta, clear
xtmixed weight week || id:
matrix list e(b)
di as txt "sd of _cons is "  as result exp([lns1_1_1]_b[_cons])
di as txt "var of _cons is " as result exp([lns1_1_1]_b[_cons])^2
*------------ end example --------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index