R Under development (unstable) (2023-11-03 r85470 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #### example originally from Gabor Grothendieck > > source(system.file("testdata/lme-tst-funs.R", package="lme4", mustWork=TRUE)) > ##--> rSim.11() > testLevel <- if (nzchar(s <- Sys.getenv("LME4_TEST_LEVEL"))) as.numeric(s) else 1 > > if (testLevel>1) { + set.seed(1) + d1 <- rSim.11(10000, k=4) + library(nlme) + m.lme <- lme(y ~ x, random=~ 1|fac , data=d1) + (VC.lme <- VarCorr(m.lme)) + detach("package:nlme") + ## + library(lme4) + fm.NM <- lmer(y ~ x + (1|fac), data=d1, control=lmerControl("Nelder_Mead")) + fm.Bq <- update(fm.NM, control=lmerControl("bobyqa")) + v.lmer <- VarCorr(fm.NM)[[1]][1,1] + stopifnot(all.equal(v.lmer,19.55,tolerance=1e-3)) + ## was 19.5482 with old starting values (1), 19.5493 with new start algorithm + } ## testLevel>1 > > proc.time() user system elapsed 0.12 0.04 0.15