[R-sig-ME] bug in refit function?

Ben Bolker bbolker at gmail.com
Wed Oct 9 19:47:53 CEST 2013


Alexandra Kuznetsova <alku at ...> writes:

> 
> 
> Hi all,
> 
> If I apply update function on the refit function, then the refitted model
becomes the initial model. The example:
> 
> > set.seed(101)
> > Y <- matrix(rnorm(1000),ncol=2)
> > d <- data.frame(y1=Y[,1],  x=rnorm(100), f=rep(1:10,10))
> > fit1 <- lmer(y1 ~ x+(1|f),data=d)
> > fit2 <- refit(fit1, newresp = Y[,2])
> > all.equal(fit1, update(fit2))
> [1] TRUE
> 

  Thanks.  The problem is that update() works by evaluating
the @call slot, which doesn't get updated by refit.  We'll work
on this.

  Ben Bolker



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