Statalist


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

Re: st: non-nested random effects


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: non-nested random effects
Date   Tue, 07 Apr 2009 11:20:03 -0500

Continuing the thread, Jacob Wegelin <jacob.wegelin@gmail.com> writes:

> Thanks very much for your replies. Now the code leads to an error as
> follows:

> . xtmixed FinishTime Sex01F PL2Age2 Sex01FxPL2Age2 PL2Age3 nFin1974toPrev
> MinCC PzCDrp MinCCxPzCDrp || _all:R.NAME || Year:

> Performing EM optimization:
> likelihood evaluates to missing
> r(430);

[...]

> When I attempted to fit this model in SAS using GLIMMIX, the software hung
> for several hours. My guess is that only software specifically designed for
> sparse matrices can fit this model on these data (5000 observations, 22 Year
> levels, 2900 NAME levels). If this is the case, does Stata plan to add
> sparse matrix capability?

In that case, Jacob should reverse the order of the levels.  Try

. xtmixed FinishTime Sex01F PL2Age2 Sex01FxPL2Age2 PL2Age3 nFin1974toPrev
   MinCC PzCDrp MinCCxPzCDrp || _all:R.Year || NAME:

Jacob's original example had a matrix dimension of 2901.  The above has a
dimension of 23.  Both fit the same model, but the latter assumes that "NAME"
values are nested within all the data and can thus be treated as just random
intercepts, realizations of a vector of dimension one.  As a general rule, in
a crossed-effects model always put the "big" level variable last.

As for sparse-matrix support, although we're very interested in how that area
of research has developed, this is not an area of current active development.

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



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index