[R-sig-ME] bug in refit function?
Alexandra Kuznetsova
alku at dtu.dk
Wed Oct 9 10:44:10 CEST 2013
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
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
[4] LC_NUMERIC=C LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lme4_1.0-4 Matrix_1.0-12 lattice_0.20-15
loaded via a namespace (and not attached):
[1] grid_3.0.1 MASS_7.3-26 minqa_1.2.1 nlme_3.1-109 splines_3.0.1 tools_3.0.1
Probably this is a bug?
Alexandra
More information about the R-sig-mixed-models
mailing list