Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Problem specifying a three-level cross-classified model using xtmixed
From
Tonatiuh Barrientos Gutierrez <[email protected]>
To
[email protected]
Subject
st: Problem specifying a three-level cross-classified model using xtmixed
Date
Fri, 10 Aug 2012 16:06:40 -0400
I am trying to build a linear mixed cross-classified model in STATA
12.1 for Windows, but I keep getting error messages. I am evaluating
if neighborhood food availability is associated with BMI changes over
time. We have four data waves nested within 5765 individuals “nested”
within neighborhoods (326 on average). Yet, some individuals moved
over time to different neighborhoods, so we need to develop a
cross-classified model.
Following Rabe-Hesketh* we tried:
. xtmixed bmi fav || _all: R.cenid ||id:, mle
Performing EM optimization:
likelihood evaluates to missing
r(430);
Where “bmi” is time varying body mass index, “fav” is time varying
food availability, “cenid” is the neighborhood identifier and “id” is
the individual identifier. I found advice from R. Gutierrez online,
recommending switching the classification terms, so I tried:
. xtmixed bmi fav || _all: R.id ||cenid:, mle
Performing EM optimization:
J(): 3900 unable to allocate real <tmp>[21742,5768]
_xtm_mixed_ll_uu(): - function returned error
_xtm_mixed_ll_u(): - function returned error
_xtm_em_iter_u(): - function returned error
_xtm_em_iter(): - function returned error
<istmt>: - function returned error
r(3900);
Again, I found an online thread explaining this error is due to memory
restrictions, so I switched to 64 bit STATA 11.2 (updated), but got
the same messages. I tried reducing the number of random intercepts
using the super cluster option described by Rabe-Hesketh (pg 491):
. supclust idno cenid, gen(cluster)
665 clusters in 21742 observations
. by cluster idno, sort: generate f=_n==1
. by cluster: generate sec=sum(f)
. xtmixed bmi fav || cluster: R.sec || idno:, mle
Yet, again I got the r(430) described above. Could anyone shed some
light as to what might be wrong with the model specification? Do I
need to further specify a term for data wave?
Thank you very much,
Tona
Tonatiuh Barrientos-Gutierrez
Post-doctoral fellow
Center for Social Epidemiology and Population Health
University of Michigan, Ann Arbor.
Reference
*Rabe-Hesketh, S. Multilevel and longitudinal modeling using Stata.
Second edition. 2008. Stata Press.
*
* 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/