Skip to content

Possible bug in lmer nested analysis with factors

2 messages · Yan Wong

#
Hello,

Is this a bug in the lmer routine?

 > library(lme4)
 > ### test case based on rats data from Crawley
 > a<-rnorm(36);b<-rep(1:3,each=12);c<-rep(1:2,each=6,3);d<-rep 
(1:3,each=2,6)
 >
 > ### mixed model works when c & d are numeric, lmer assumes they  
are factors
 > m <- lmer(a ~ b + (1|c/d))
 >
 > ### but bails out when they are actually specified as factors
 > c<-factor(c); d<-factor(d)
 > m <- lmer(a ~ b + (1| c / d))

Error in lmer(a ~ b + (1 | c/d)) : entry 0 in matrix[0,0] has row  
2147483647 and column 2147483647
In addition: Warning message:
/ not meaningful for factors in: Ops.factor(c, d)


Cheers

Yan
#
On 16 Sep 2005, at 16:57, Yan Wong wrote:

            
Sorry, I forgot to specify:

R 2.1.1, Mac OS X 10.4.2, lme4 version 0.98-1, Matrix version 0.98-7.

Yan