Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Non standard commands and statsby


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Non standard commands and statsby
Date   Thu, 9 Mar 2006 08:23:28 -0600

Is your Stata up-to-date?

. which xtmixed
C:\Program Files\Stata9\ado\updates\x\xtmixed.ado
*! version 1.1.8  17aug2005

. which statsby
C:\Program Files\Stata9\ado\updates\s\statsby.ado
*! version 3.2.6  19aug2005

This example works ok:
 
. use http://www.stata-press.com/data/r9/productivity.dta, clear
(Public Capital Productivity)

. gen byte tag = year<1978

. statsby _b , clear total verbose by(tag): xtmixed gsp ///
>  ||region: ||state: ||year: if year >1971  ,difficult
(running xtmixed on estimation sample)

      command:  xtmixed (gsp) (region:) (state:) (year: if year >1971,
difficult)
   gsp_b_cons:  [gsp]_b[_cons]
lns1_1_1_b_~s:  [lns1_1_1]_b[_cons]
lns2_1_1_b_~s:  [lns2_1_1]_b[_cons]
lns3_1_1_b_~s:  [lns3_1_1]_b[_cons]
lnsig_e_b_c~s:  [lnsig_e]_b[_cons]
           by:  tag

Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..

. l, noobs

  +----------------------------------------------------------------+
  | tag   gsp_b_~s   lns1_1_~s   lns2_1_~s   lns3_1_~s   lnsig_e~s |
  |----------------------------------------------------------------|
  |   0   10.77133   -.3787023   -.2424748   -2.832074   -2.871997 |
  |   1   10.57808   -.2984414   -.2535143   -3.284717   -3.153928 |
  |   .   10.69417   -.3458418   -.2483991   -2.241496   -2.493095 |
  +----------------------------------------------------------------+


You might try contacting tech-support:

http://www.stata.com/support/faqs/techsup/techsup.html

Scott

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Rory Wolfe
> Sent: Wednesday, March 08, 2006 8:14 PM
> To: [email protected]
> Subject: st: Re: Non standard commands and statsby
> 
> I encountered the problem in a three-level model (output further down):
> statsby _b, clear by(cycle): xtmixed angle || pt: || session: if
> side=="L", mle
> 
> and I've tried cutting it down to a two-level model as in Scott's example
> but haven't had any success with that either (same problem as for the
> above).
> 
> If I cut it down to a 1-level model, i.e. remove all random effects, then
> it runs ok:
> statsby _b, clear by(cycle): xtmixed angle if side=="L", mle
> 
> Here is the full error output from statsby
> 
> . statsby _b , clear noisily by(cycle):xtmixed angle ||pt: ||session: if
> side=="L", mle
> statsby: First call to xtmixed with data as is:
> 
> . xtmixed angle ||pt: ||session: if side=="L", mle
> invalid ':'
> 
> ...
> 
> The -xtmixed- syntax for my 3-level model, i.e. what statsby tries to
> run above but complains about an "invalid ':'", works fine when I run
> it without -statsby- !!!
> 
> Rory
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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