[R-sig-ME] Does lmer have it's own random number generator?
Mike Lawrence
Mike.Lawrence at dal.ca
Mon Jan 3 03:51:51 CET 2011
Hi folks,
Does lmer have it's own internally seeded random number generator? I
just came across an example where I get different results across
repeated identically specified lmer fits even when I use set.seed():
library(ez)
data(ANT)
#repeat the below a few times, the result
# on the last line should vary occasionally,
# sometimes TRUE, sometimes FALSE,
# and sometimes there will be a warning
# after the fit
set.seed(1)
fit = lmer(
formula = rt ~ (1|subnum) +
cue*flank*group*block +
cue*flank*group*I(block^2) +
cue*flank*group*I(block^3)
, data = ANT[ANT$error==0,]
)
any(is.finite(attr(fit,'deviance')))
More information about the R-sig-mixed-models
mailing list