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
> An example of the problem is helpful. This seems to work ok:
>
> . webuse grunfeld,clear
>
> . gen byte tag = year<1945
>
> . statsby _b , clear total verbose by(tag):xtmixed invest mval kstock ||
> com: ,mle
> (running xtmixed on estimation sample)
> ...
>
> Scott
>
> > -----Original Message-----
> > From: [email protected] [mailto:owner-
> > [email protected]] On Behalf Of Rory Wolfe
> > Sent: Monday, March 06, 2006 9:15 PM
> > To: [email protected]
> > Subject: st: Non standard commands and statsby
> >
> > I wish to use statsby in conjuction with xtmixed.
> >
> > I am unable to and I guess it is because of the "non-standard"
> > command structure of xtmixed, in particular the use of : in
> > the xtmixed syntax.
> >
> > Has anyone encountered this problem and found a solution? Will
> > I need to resort to writing my own "statsby" ado file?
> >
> > Rory
--
Rory Wolfe
Department of Epidemiology and Preventive Medicine
School of Applied Clinical and Public Health Sciences
and the Central and Eastern Clinical School
Monash University
Alfred Hospital, Commercial Road
Melbourne VIC 3004
AUSTRALIA
*
* 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/