Statalist


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

Re: st: loop with xtmixed


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: loop with xtmixed
Date   Wed, 27 Jan 2010 09:04:06 -0500

Fix your loop by moving the -if- before the comma:

forvalues j= 1(1)25{
   xtmixed vary varx if idj== `j' ||GROUP: , mle var covar(un)
   replace b_cons = _b[_cons] if idj==`j'
   replace se_cons = _se[_cons] if idj==`j'
}


hth,
Jeph


Flavia Fossati wrote:
Dear List,

I was wondering if there is a possibility to make a fovalue loop with the xtmixed command. I tried this way but it doesn't work (option if is not allowed):

forvalues j= 1(1)25{
xtmixed vary varx ||GROUP: , mle var covar(un) if idj== `j'
replace b_cons = _b[_cons] if idj==`j'
replace se_cons = _se[_cons] if idj==`j'
}

best,
flavia
*
*   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