[Lme4-commits] r1673 - pkg/lme4/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 17 16:01:19 CET 2012


Author: bbolker
Date: 2012-03-17 16:01:19 +0100 (Sat, 17 Mar 2012)
New Revision: 1673

Modified:
   pkg/lme4/tests/optimizer.R
Log:

  comment out test that fails on r-forge/windows (but not win-builder!)



Modified: pkg/lme4/tests/optimizer.R
===================================================================
--- pkg/lme4/tests/optimizer.R	2012-03-17 01:09:36 UTC (rev 1672)
+++ pkg/lme4/tests/optimizer.R	2012-03-17 15:01:19 UTC (rev 1673)
@@ -1,16 +1,22 @@
 library(lme4)
 ## should be able to run any example with any bounds-constrained optimizer ...
+##  Nelder_Mead, bobyqa built in; optimx/nlminb, optimx/L-BFGS-B
+##  optimx/Rcgmin will require a bit more wrapping/interface work (requires gradient)
 
-## these are the only ones we know of
 fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)  ## Nelder_Mead
 fm1B <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
-            optimizer="bobyqa") 
+            optimizer="bobyqa")
+stopifnot(all.equal(fixef(fm1),fixef(fm1B)))
 require(optimx)
-fm1C <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
-             optimizer="optimx", control=list(method="nlminb"))
-fm1D <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
-             optimizer="optimx", control=list(method="L-BFGS-B"))
-all.equal(fixef(fm1),fixef(fm1B),fixef(fm1C),fixef(fm1D))
+## FAILS on Windows (on r-forge only, not win-builder)... 'function is infeasible at initial parameters'
+## (can we test whether we are on r-forge??)
+if (.Platform$OS.type != "windows") {
+    fm1C <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
+                 optimizer="optimx", control=list(method="nlminb"))
+    fm1D <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
+                 optimizer="optimx", control=list(method="L-BFGS-B"))
+    stopifnot(all.equal(fixef(fm1),fixef(fm1B),fixef(fm1C),fixef(fm1D)))
+}
 
 gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
                    data = cbpp, family = binomial, tolPwrss=1e-13)
@@ -34,4 +40,4 @@
   n1 <- nlminb(start=1,objective=gm1fun0,control=list(),lower=0)  ## false convergence=code 1
   b1 <- bobyqa(par=1,fn=gm1fun0,control=list(),lower=0)
 }
-       
+



More information about the Lme4-commits mailing list