Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: more on_statsby error


From   "Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index