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 at the end of May, and its replacement, statalist.org is already up and running.


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

AW: st: xtmixed with option residuals


From   Schöler, Lisa <lschoeler@wiwi.uni-frankfurt.de>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   AW: st: xtmixed with option residuals
Date   Mon, 11 Oct 2010 19:30:47 +0000

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

standard-error calculation failed
convergence not achieved

Best
Lisa
________________________________________
Von: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu]&quot; im Auftrag von &quot;Roberto G. Gutierrez, StataCorp [rgutierrez@stata.com]
Gesendet: Montag, 11. Oktober 2010 19:46
Bis: statalist@hsphsun2.harvard.edu
Betreff: Re: st: xtmixed with option residuals

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.

--Bobby
rgutierrez@stata.com
*
*   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/
*
*   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