[R] R lmer debugging: Error in [[<-.data.frame(*tmp*, i,	value = integer(0)) : replacement has 0 rows, data has 117
    Ben Bolker 
    bbolker at gmail.com
       
    Tue Dec  3 17:31:56 CET 2013
    
    
  
Cynthia Tedore <Cynthia.Tedore <at> biol.lu.se> writes:
> 
> males is a factor. If I don't specify that, then it
> treats it as a numeric.
> any other suggestions?
transform(spiders,focal.chel=as.numeric(focal.chel),
        opponent.chel=as.numeric(opponent.chel),fmales=factor(males))
model1<-lmer(threatened~focal.chelopponent.chel+(1|fmales),
   na.action=na.omit,data=spiders)
  I'm quite surprised (and a little skeptical) that `lmer` treats
males as a numeric in that particular context (i.e., when specified
as a grouping variable).  Can you provide evidence (i.e., what specific
error/incorrect results do you get if you follow Pascal's advice) ?
    
    
More information about the R-help
mailing list