Statalist


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

Re: st: AW: Storing random intercept estimation? (xtmixed?)


From   Christian Weiß <[email protected]>
To   [email protected]
Subject   Re: st: AW: Storing random intercept estimation? (xtmixed?)
Date   Thu, 17 Sep 2009 17:41:43 -0400

Hi Martin,

thanks a lot, works great! The first colon was a typo. The actual
model I am trying to estimate is quite a bit more complex than the
"empty" one presented. so far xtmixed works fine for me.

Regards
Christian


On Thu, Sep 17, 2009 at 5:27 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> BTW, are you sure about the first colon after the double pipe symbol?
>
> If all you want is the model you have presented here, you could get it more
> easily from -xtreg- (where results are more intuitively accessible):
>
>
> ********
> clear*
> vers 10.1
> set obs 1000
>
> //id
> gen id=_n
>
> //individual effect
> gen alpha=rnormal()
>
> //expand to # of time periods
> expand 10
>
> //get time period (after expansion!)
> bys id: gen time=_n
>
> //residual per time period
> gen eps=rnormal()
>
> compress
>
> //xtset the thing
> xtset id time
>
> //dependent
> gen mydependent= /*
> */ rnormal(3,10)+alpha+eps
>
> xtmixed mydepend || id:
>
> xtreg mydepend, re
> ********
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Christian Weiß
> Gesendet: Donnerstag, 17. September 2009 23:03
> An: statalist
> Betreff: st: Storing random intercept estimation? (xtmixed?)
>
> Dear Statalist,
>
>
> using a textbook example on birthweight I estimated the following
> model: xtmixed birwt ||: momid:, variance
> yielding
>
>
> ----------------------------------------------------------------------------
> --
>       birwt |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
> -------------+--------------------------------------------------------------
> --
>       _cons |   3467.969   7.138554   485.81   0.000     3453.977
> 3481.96
> ----------------------------------------------------------------------------
> --
>
> ----------------------------------------------------------------------------
> --
>  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf.
> Interval]
> -----------------------------+----------------------------------------------
> --
> momid: Identity              |
>                  var(_cons) |     135686   4755.874      126677.6
> 145335
> -----------------------------+----------------------------------------------
> --
>               var(Residual) |   142625.4   2965.965      136929.1
> 148558.7
> ----------------------------------------------------------------------------
> --
> LR test vs. linear regression: chibar2(01) =  1316.12 Prob >= chibar2 =
> 0.0000
>
> with "di _b[_cons]" I can display (and thus process) the estimated
> coefficient of birwt. However, I would like to process the estimated
> variance components of the random intercept (i.e. var(_cons) and
> var(Residual).
>
> How can adress these values?
>
> Best,
> Chris
>
>
>
>
> Viele Grüße
> Christian
>
> *
> *   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/
>

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index