[Lme4-commits] r1650 - pkg/lme4Eigen/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 13 23:37:44 CET 2012


Author: dmbates
Date: 2012-03-13 23:37:44 +0100 (Tue, 13 Mar 2012)
New Revision: 1650

Modified:
   pkg/lme4Eigen/R/lmer.R
Log:
Add as.double coercions to try to debug the problem with bobyqa.  They are benign so I will leave them.


Modified: pkg/lme4Eigen/R/lmer.R
===================================================================
--- pkg/lme4Eigen/R/lmer.R	2012-03-13 16:42:14 UTC (rev 1649)
+++ pkg/lme4Eigen/R/lmer.R	2012-03-13 22:37:44 UTC (rev 1650)
@@ -490,17 +490,17 @@
     ff <- NULL
     if (is(rho$resp, "lmerResp")) {
       rho$lmer_Deviance <- lmer_Deviance
-      ff <- function(theta) .Call(lmer_Deviance, pp$ptr(), resp$ptr(), theta)
+      ff <- function(theta) .Call(lmer_Deviance, pp$ptr(), resp$ptr(), as.double(theta))
     } else if (is(rho$resp, "glmResp")) {
         if (nAGQ < 2L) {
             rho$glmerLaplace <- glmerLaplace
             ff <- switch(nAGQ + 1L,
                          function(theta)
-                         .Call(glmerLaplace, pp$ptr(), resp$ptr(), theta,
-                               u0, beta0, verbose, FALSE, tolPwrss),
+                         .Call(glmerLaplace, pp$ptr(), resp$ptr(), as.double(theta),
+                               as.double(u0), as.double(beta0), verbose, FALSE, tolPwrss),
                          function(pars)
-                         .Call(glmerLaplace, pp$ptr(), resp$ptr(), pars[dpars], u0,
-                               pars[-dpars], verbose, TRUE, tolPwrss))
+                         .Call(glmerLaplace, pp$ptr(), resp$ptr(), as.double(pars[dpars]),
+                               as.double(u0), as.double(pars[-dpars]), verbose, TRUE, tolPwrss))
         } else {
             rho$glmerAGQ <- glmerAGQ
             rho$GQmat <- GHrule(nAGQ)
@@ -513,8 +513,8 @@
             rho$nlmerLaplace <- nlmerLaplace
             ff <- switch(nAGQ + 1L,
                          function(theta)
-                         .Call(nlmerLaplace, pp$ptr(), resp$ptr(), theta,
-                               u0, beta0, verbose, FALSE, tolPwrss),
+                         .Call(nlmerLaplace, pp$ptr(), resp$ptr(), as.double(theta),
+                               as.double(u0), beta0, verbose, FALSE, tolPwrss),
                          function(pars)
                          .Call(nlmerLaplace, pp$ptr(), resp$ptr(), pars[dpars], u0,
                                pars[-dpars], verbose, TRUE, tolPwrss))



More information about the Lme4-commits mailing list