[R] question about warning message in nlme model

David Atkins datkins at fuller.edu
Thu Nov 29 16:54:46 CET 2007


Hi Christine--

The problem (and error msg) arises because you have repeated measures 
nested in individuals and *exactly* two individuals in every couple. 
Your syntax below specifies a random intercept and slope, and 
implicitly, the covariance between those random-effects at the second 
(or individual) level.  Your second level has only two people per couple 
but the model is trying to fit separate slope, intercept, and covariance 
-- three pieces of information from two sources of information.

lme() can actually fit the model (note it's a warning and not an error) 
but the random-effects at that level are likely to be funny (eg, perfect 
correlation).

Practically, you could fit models that only had a random-intercept or 
only had a random-slope and compare them to what you get from the model 
below.

I discuss this (briefly) in the following article:

Atkins, D. C. (2005).  Using multilevel models to analyze marital and 
family treatment data: Basic and advanced issues.  Journal of Family 
Psychology, 19, 98-110.

which you can find:

www.ats.ucla.edu/stat/paperexamples/

Hope that helps.

Dave

-- 
Dave Atkins, PhD
Associate Professor in Clinical Psychology
Fuller Graduate School of Psychology
Email: datkins at fuller.edu
Phone: 626.584.5554

Christine wrote:

I am writing to inquire about a warning message that I receive when
trying to model a random slope and intercept at the second level of a
3-level model.  Specifically, I am testing a 3-level model in which
time (WEEK) is nested in participants (PARTICIP) and participants are
nested in dyads (DYADID). The goal is to examine how an interpersonal
style (CORUMTO) one week predicts changes in depression the following
week (BDIAFTER) controlling for levels of depression (BDI) from the
previous week.  I have approximately 80 dyads and approximately 160
participants.

When modeling a random slope and intercept at the second level (the
participant or person level), I receive output, and I also receive the
following error message.

Warning message
Fewer observations than random effects in all level 2 groups

I was wondering what this error message means and if it may be
suggesting that the results after the summary statement are incorrect.

I also want to verify that the following syntax is appropriate for
modeling a random intercept and slope on the variable CORUMTO at the
participant level and a random intercept and fixed slope at the dyad
level.

intercept<-lme(BDIAFTER~BDI+WEEK+CORUMTO, random=list(DYADID=~1,
PARTICIP=~CORUMTO), data=weeklydata)

Any help you can give would be much appreciated.

Thank you for your time.

Sincerely,
Christine Calmes

Christine Calmes, M.A.
Doctoral Candidate, Clinical Psychology
University at Buffalo: The State University at New York
Department of Psychology; Park Hall
North Campus
Buffalo NY, 14260



More information about the R-help mailing list