[Lme4-commits] r1690 - pkg/lme4/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Mar 22 20:08:47 CET 2012


Author: bbolker
Date: 2012-03-22 20:08:47 +0100 (Thu, 22 Mar 2012)
New Revision: 1690

Modified:
   pkg/lme4/R/lmer.R
Log:
   
   fix typo/bug (still passing X to mkRespMod, even though that's commented out currently)
   if all(par==0) and optimizer=="bobyqa", push initial parameters away from the boundary
         (fix for problem with refitML() in SASmixed)


Modified: pkg/lme4/R/lmer.R
===================================================================
--- pkg/lme4/R/lmer.R	2012-03-22 18:49:37 UTC (rev 1689)
+++ pkg/lme4/R/lmer.R	2012-03-22 19:08:47 UTC (rev 1690)
@@ -321,7 +321,7 @@
     parent.env(rho) <- parent.frame()
     rho$pp <- do.call(merPredD$new, c(reTrms[c("Zt","theta","Lambdat","Lind")], n=nrow(X), list(X=X)))
 					# response module
-    rho$resp <- mkRespMod(fr, family=family)
+    rho$resp <- mkRespMod(fr, family=family) ## , X=X)
 					# initial step from working response
     if (compDev) {
 	.Call(glmerWrkIter, rho$pp$ptr(), rho$resp$ptr())
@@ -1977,6 +1977,7 @@
              if (is.null(control$xt)) control$xt <- control$xst*5e-4
              if (!is.null(rho)) rho$control <- control
          })
+    if (optimizer=="bobyqa" && all(par==0)) par[] <- 0.001  ## minor kluge
     arglist <- list(fn=fn, par=par, lower=lower, upper=upper, control=control)
   ## optimx: must pass method in control (?) because 'method' was previously
   ## used in lme4 to specify REML vs ML



More information about the Lme4-commits mailing list