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]

st: more on_statsby error


From   "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: more on_statsby error
Date   Wed, 22 Sep 2010 10:33:11 -0500

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/


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