[R-sig-ME] lme4 dev github version

Ben Bolker bbolker at gmail.com
Mon Sep 9 00:08:47 CEST 2013


Ben Bolker <bbolker at ...> writes:

> Gustaf:
> >> fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
> >> dat <- simulate(fm1)
> >> fm3 <- refit(fm1, newresp = dat)
> > Error in stopifnot(length(newresp <- as.numeric(as.vector(newresp))) ==  :
> >   (list) object cannot be coerced to type 'double'
> 
>   Ah.
> 
>   simulate() returns a *list* of simulations, even if nsim=1.
> 
>   Therefore you just need refit(fm1, newresp=dat[[1]])
> 
>   We should add an example of this to the documentation.

  This should be fixed in the most recent Github version (and
will be fixed in the release version), for backward compatibility
with lme4.0

  Ben



More information about the R-sig-mixed-models mailing list