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]
st: RE: more on_statsby error
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: RE: more on_statsby error
Date
Wed, 22 Sep 2010 18:56:30 +0200
<>
But note that you can delimit the parts with round parantheses and make
things work:
***********
webuse productivity, clear
preserve
statsby _b[private],by(region): xtmixed (gsp private, noconst) (region:)
(state:, mle cov(exchangeable) nolog)
li
restore
statsby _b[private],by(region): xtmixed gsp private, noconst || region: ||
state:, mle cov(exchangeable) nolog
***********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Feiveson, Alan H.
(JSC-SK311)
Sent: Mittwoch, 22. September 2010 17:33
To: [email protected]
Subject: st: more on_statsby error
Apparently, in an -xtmixed_ command with more than one level, -statsby- can
only handle options in the fixed or random sections if such options occur
only once in the whole model:
option in the fixed part ony:
. statsby _b[ib],by(condition outcome) : xtmixed y ib, noconst ||isub: ib
||fd: R.ib
(running xtmixed on estimation sample)
command: xtmixed (y ib, noconst) (isub: ib) (fd: R.ib)
_stat_1: _b[ib]
by: condition outcome
Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
[works]
option in the first random level only:
. statsby _b[ib],by(condition outcome) : xtmixed y ib ||isub: ib,noconst
||fd: R.ib
(running xtmixed on estimation sample)
command: xtmixed (y ib) (isub: ib, noconst) (fd: R.ib)
_stat_1: _b[ib]
by: condition outcome
Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
[works]
option in the second random level only:
. statsby _b[ib],by(condition outcome) : xtmixed y ib ||isub: ib ||fd:
R.ib, noconst
(running xtmixed on estimation sample)
command: xtmixed (y ib) (isub: ib) (fd: R.ib, noconst)
_stat_1: _b[ib]
by: condition outcome
Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
.........
[works]
One option in the fixed part and one option in the first random level:
. statsby _b[ib],by(condition outcome) : xtmixed y ib, noconst ||isub:
ib,noconst ||fd: R.ib
invalid 'noconst'
r(198);
In general, -statsby- will fail if there is more than one option section
anywhere in the model.
Al Feiveson
*
* 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/