Running ‘DAS-scale.R’
  Running ‘PsiFunction.R’ [10s/11s]
  Running ‘compare-methods.R’ [14s/29s]
Running the tests in ‘tests/compare-methods.R’ failed.
Complete output:
  > ## test that should make sure that the results remain constant
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > fit <- function(formula, data, methods =  c("DASvar", "DAStau"),
  +                 rho.e = cPsi, rho.b = cPsi, ...) {
  +     fits <- list()
  +     ## compare with result of lmer if rho arguments are not given
  +     classic <- ! any(c("rho.e", "rho.b") %in% names(match.call())[-1])
  +     if (classic) fm <- lmer(formula, data)
  +     for (method in methods) {
  +         fits[[method]] <- list()
  +         if (classic) fits[[method]][["lmer"]] <- fm
  +         cat("\n########", method, "########\n")
  +         try({cat("Time elapsed:",
  +                  system.time(m <- rlmer(formula, data, method=method,
  +                                         rho.e = rho.e, rho.b = rho.b, ...)),
  +                  "\n")
  +              fits[[method]][["IRWLS"]] <- m
  +              print(summary(m))
  +              print(robustlmm:::u.rlmerMod(m), 4)
  +              if (classic) {
  +                  ## compare with lmer fit
  +                  cat("#### Checking equality with lmer... ####\n")
  +                  cat("Fixed effects: ", all.equal(fixef(fm), fixef(m), tolerance = 1e-4), "\n")
  +                  cat("Random effects:", all.equal(ranef(fm), ranef(m), tolerance = 1e-4,
  +                                                   check.attributes=FALSE), "\n")
  +                  cat("Theta:         ", all.equal(theta(fm), theta(m), tolerance = 1e-4), "\n")
  +                  cat("Sigma:         ", all.equal(sigma(fm), sigma(m), tolerance = 1e-4), "\n")
  +                  if (packageVersion("lme4") >= "0.99999911.0") {
  +                      tmp <- all.equal(fm@pp$unsc(), unname(m@pp$unsc()), tolerance = 1e-4)
  +                      if (!isTRUE(tmp))
  +                          cat("Unsc:          ", tmp , "\n")
  +                  }
  +              }
  +          })
  +         fits[[method]][["dnames"]] <- names(fits[[method]])
  +     }
  +     cat("\n################################################\n")
  +     cat("################################################\n")
  +     cat("################################################\n")
  +     for (method in methods) {
  +         cat("\n################ results for",method," ##############\n")
  +         cmp <- do.call(compare, fits[[method]])
  +         cmp <- cmp[grep("^rho", rownames(cmp), invert=TRUE),,drop=FALSE]
  +         print.default(cmp, quote="FALSE")
  +     }
  + }
  > 
  > if (FALSE) {
  +     ## classic (REML)
  +     fit(Yield ~ (1 | Batch), Dyestuff)
  +     fit(Yield ~ (1 | Batch), Dyestuff2)
  +     fit(diameter ~ (1|plate) + (1|sample), Penicillin)
  + 
  +     ## classic (no init)
  +     fit(Yield ~ (1 | Batch), Dyestuff, init = lmerNoFit)
  +     fit(Yield ~ (1 | Batch), Dyestuff2, init = lmerNoFit)
  +     fit(diameter ~ (1|plate) + (1|sample), Penicillin, init = lmerNoFit)
  + 
  +     ## smoothPsi, wExp = 1
  +     fit(Yield ~ (1 | Batch), Dyestuff,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi, rho.sigma.e = smoothPsi)
  +     fit(Yield ~ (1 | Batch), Dyestuff2,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi, rho.sigma.e = smoothPsi)
  +     fit(diameter ~ (1|plate) + (1|sample), Penicillin,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi, rho.sigma.e = smoothPsi)
  + 
  +     ## smoothPsi Proposal II for estimating sigma only
  +     fit(Yield ~ (1 | Batch), Dyestuff,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi)
  +     fit(Yield ~ (1 | Batch), Dyestuff2,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi)
  +     fit(diameter ~ (1|plate) + (1|sample), Penicillin,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         rho.sigma.b = smoothPsi)
  + }
  > 
  > ## smoothPsi Proposal II (default)
  > fit(Yield ~ (1 | Batch), Dyestuff,
  +     rho.e = smoothPsi, rho.b = smoothPsi)
  
  ######## DASvar ########
  Note: method with signature 'dsparseMatrix#dgeMatrix' chosen for function 'crossprod',
   target signature 'dsCMatrix#dgeMatrix'.
   "CsparseMatrix#ddenseMatrix" would also be valid
  Time elapsed: 3.311 0.099 3.744 0 0 
  Robust linear mixed model fit by DASvar 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -1.2872 -0.6775  0.1308  0.7136  1.7416 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept) 2184     46.73   
   Residual             2933     54.16   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)  1526.82      22.04   69.27
  
  Robustness weights for the residuals: 
   25 weights are ~= 1. The remaining 5 ones are
      2     3     5    18    23 
  0.988 0.988 0.984 0.770 0.988 
  
  Robustness weights for the random effects: 
  [1] 1.000 1.000 1.000 1.000 0.999 1.000
  
  Rho functions used for fitting:
    Residuals:
      eff: smoothed Huber (k = 1.345, s = 10) 
      sig: smoothed Huber, Proposal II (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal II (k = 1.345, s = 10) 
        A       B       C       D       E       F 
  -19.822   1.081  33.966 -30.283  67.013 -51.900 
  
  ######## DAStau ########
  Time elapsed: 2.267 0.031 2.883 0 0 
  Robust linear mixed model fit by DAStau 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -1.2622 -0.6555  0.1215  0.6940  1.6971 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept) 2400     48.99   
   Residual             3084     55.54   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)     1527         23   66.38
  
  Robustness weights for the residuals: 
   25 weights are ~= 1. The remaining 5 ones are
      2     3     5    18    23 
  0.997 0.997 0.993 0.790 0.995 
  
  Robustness weights for the random effects: 
  [1] 1 1 1 1 1 1
  
  Rho functions used for fitting:
    Residuals:
      eff: smoothed Huber (k = 1.345, s = 10) 
      sig: smoothed Huber, Proposal II (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal II (k = 1.345, s = 10) 
       A      B      C      D      E      F 
  -19.73   1.04  33.50 -29.59  66.03 -51.26 
  
  ################################################
  ################################################
  ################################################
  
  ################ results for DASvar  ##############
                      IRWLS    
  Coef                         
  (Intercept)         1527 (22)
                               
  VarComp                      
  (Intercept) | Batch 46.7     
                               
  sigma               54.2     
                               
  
  ################ results for DAStau  ##############
                      IRWLS    
  Coef                         
  (Intercept)         1527 (23)
                               
  VarComp                      
  (Intercept) | Batch 49       
                               
  sigma               55.5     
                               
  > fit(Yield ~ (1 | Batch), Dyestuff2,
  +     rho.e = smoothPsi, rho.b = smoothPsi)
  
  ######## DASvar ########
  
   *** caught segfault ***
  address 39, cause 'memory not mapped'
  
  Traceback:
   1: sys.function(parent)
   2: callNextMethod()
   3: initialize(value, ...)
   4: initialize(value, ...)
   5: new(paste0(.M.kind(data), "geMatrix"), Dim = dim(data), Dimnames = .M.DN(data),     x = c(data))
   6: Matrix(e2)
   7: eval(expr, envir, enclos)
   8: eval(call, parent.frame())
   9: callGeneric(e1, Matrix(e2))
  10: crossprod(object@pp$Zt, object@pp$b.r) + (object@pp$X %*% object@pp$beta)
  11: crossprod(object@pp$Zt, object@pp$b.r) + (object@pp$X %*% object@pp$beta)
  12: drop(crossprod(object@pp$Zt, object@pp$b.r) + (object@pp$X %*%     object@pp$beta))
  13: .mu(object)
  14: object@resp$updateMu(.mu(object))
  15: setFixef(object, par[1:p])
  16: fitEffects(c(object@pp$beta, object@pp$b.s), object)
  17: fun2(scale0, object@resp$wtres)
  18: updateSigma(object, fit.effects = fit.effects)
  19: setTheta(lobj, theta0, fit.effects = TRUE, update.sigma = method !=     "Opt")
  20: rlmer(formula, data, method = method, rho.e = rho.e, rho.b = rho.b,     ...)
  21: system.time(m <- rlmer(formula, data, method = method, rho.e = rho.e,     rho.b = rho.b, ...))
  22: cat("Time elapsed:", system.time(m <- rlmer(formula, data, method = method,     rho.e = rho.e, rho.b = rho.b, ...)), "\n")
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: tryCatchList(expr, classes, parentenv, handlers)
  26: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        msg <- conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && identical(getOption("show.error.messages"),         TRUE)) {        cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  27: try({    cat("Time elapsed:", system.time(m <- rlmer(formula, data,         method = method, rho.e = rho.e, rho.b = rho.b, ...)),         "\n")    fits[[method]][["IRWLS"]] <- m    print(summary(m))    print(robustlmm:::u.rlmerMod(m), 4)    if (classic) {        cat("#### Checking equality with lmer... ####\n")        cat("Fixed effects: ", all.equal(fixef(fm), fixef(m),             tolerance = 1e-04), "\n")        cat("Random effects:", all.equal(ranef(fm), ranef(m),             tolerance = 1e-04, check.attributes = FALSE), "\n")        cat("Theta:         ", all.equal(theta(fm), theta(m),             tolerance = 1e-04), "\n")        cat("Sigma:         ", all.equal(sigma(fm), sigma(m),             tolerance = 1e-04), "\n")        if (packageVersion("lme4") >= "0.99999911.0") {            tmp <- all.equal(fm@pp$unsc(), unname(m@pp$unsc()),                 tolerance = 1e-04)            if (!isTRUE(tmp))                 cat("Unsc:          ", tmp, "\n")        }    }})
  28: fit(Yield ~ (1 | Batch), Dyestuff2, rho.e = smoothPsi, rho.b = smoothPsi)
  An irrecoverable exception occurred. R is aborting now ...