Skip to content
Back to formatted view

Raw Message

Message-ID: <50E14D7F-8B7D-4D1A-977E-CB36C499A8E7@leeds.ac.uk>
Date: 2005-09-16T15:57:54Z
From: Yan Wong
Subject: Possible bug in lmer nested analysis with factors

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