[R] error messgage in lmer for random intercept and slope model

Margaret Gorlin mgorlin at optonline.net
Sun Dec 2 20:20:45 CET 2007


Greetings,

I am trying to run a logistic regression model for binary data with a random
intercept and slope in R 2.6.1.  When I use the code:

lmer1<-lmer(infect ~  time+gender + (1+time|id), family=binomial, data=ichs,
method="Laplace")

Then from:
 summary(lmer1)
I get the message:

Error in if (any(sd < 0)) return("'sd' slot has negative entries") :
  missing value where TRUE/FALSE needed

The model with just a random intercept has no difficulty.  That is the
model:

lmer1<-lmer(infect ~  time+gender + (1|id), family=binomial, data=ichs,
method="Laplace")

yields no such message.  Can someone please tell me what this is about?

Thank you,
Margaret Gorlin
PhD Student
UMDNJ SPH



More information about the R-help mailing list