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]

RE: st: xtmixed with option residuals


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: xtmixed with option residuals
Date   Mon, 11 Oct 2010 20:34:38 +0100

It looks as if you are trying to fit a model not suited to your data. So, try something simpler or try to find out if some feature of your data is the problem. 

Nick 
n.j.cox@durham.ac.uk 

Schöler, Lisa

Thank you very much for your answer. I tried it and I got another error

standard-error calculation failed
convergence not achieved

Roberto G. Gutierrez

Lisa Schoeler <lschoeler@wiwi.uni-frankfurt.de> asks:

> .xtmixed q0 number_brands market_share intensity satisfaction channels
> margin sga0 rd0 cogs0 lppe0 income0 lassets0 leverage0 ||SIC_twodigits:
> number_brands market_share intensity satisfaction channels margin, mle
> residuals(ar 1, by(id) t(year))

> And I get the following error:

> option residuals(): by variable is not constant within lowest-level panels
> r(459);

> I don't understand why I get this error. I have a dataset that includes 9
> yearly observations for different companies(unique id for each company) that
> are in different SICs.  Can anyone tell me where my problem is?

My guess is that Lisa wants an autoregressive structure within the groups
defined by variable -id-, summarized by one AR parameter.  If this is the
case, then instead of specifying the residual structure "by(id)", Lisa should
define a new (empty) lowest level on the -id- variable:

  xtmixed q0 number_brands market_share intensity satisfaction     ///
          channels margin sga0 rd0 cogs0 lppe0 income0 lassets0    ///
          leverage0 || SIC_twodigits: number_brands market_share   ///
          intensity satisfaction channels margin || id:, nocons    ///
          mle residuals(ar 1, t(year))

When you use -by()- within -residuals()-, you are estimating a set of
parameters for each group of the by variable, which is probably not what Lisa
wants.


*
*   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