Running 'DAS-scale.R' [0s]
  Running 'DASvar-fallback.R' [3s]
  Running 'PsiFunction.R' [6s]
  Running 'asymptoticEfficiency.R' [160s]
  Running 'compare-methods.R' [170s]
  Running 'expectations.R' [0s]
  Running 'fitDatasets.R' [176s]
  Running 'genericFunctions.R' [170s]
  Running 'getME.R' [171s]
  Running 'multipleGroupingFactorsTestData.R' [0s]
  Running 'offset.R' [154s]
  Running 'psi-rho-funs.R' [3s]
  Running 'rlmerMod.R' [0s]
  Running 'simulationStudies.R' [171s]
  Running 'subset.R' [0s]
  Running 'tau.R' [0s]
  Running 'testMatrices.R' [0s]
  Running 'weights.R' [165s]
Running the tests in 'tests/asymptoticEfficiency.R' failed.
Complete output:
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > asymptoticVariance_generic <- robustlmm:::asymptoticVariance_generic
  > asymptoticVariance_classic <- robustlmm:::asymptoticVariance_classic
  > asymptoticVariance_huber_proposal2 <- robustlmm:::asymptoticVariance_huber_proposal2
  > partialMoment_standardNormal <-
  +     robustlmm:::partialMoment_standardNormal
  > 
  > ## check classic implementation
  > for (equation in c("location", "scale", "eta", "tau", "mu")) {
  +     dimension <- if (equation %in% c("location", "scale"))
  +         1
  +     else
  +         2
  +     stopifnot(all.equal(
  +         asymptoticVariance_classic(equation, dimension),
  +         asymptoticVariance_generic(cPsi, equation, dimension)
  +     ))
  + }
  > 
  > ## check partial moment function
  > integrate_partialMoment <- function(z, n) {
  +     int <- integrate(function(x)
  +         x ^ n * dnorm(x),-Inf, z)
  +     return(int$value)
  + }
  > stopifnot(
  +     all.equal(
  +         partialMoment_standardNormal(2, 2),
  +         integrate_partialMoment(2, 2)
  +     ),
  +     all.equal(
  +         partialMoment_standardNormal(2, 3),
  +         integrate_partialMoment(2, 3)
  +     ),
  +     all.equal(
  +         partialMoment_standardNormal(2, 4),
  +         integrate_partialMoment(2, 4)
  +     ),
  +     all.equal(
  +         partialMoment_standardNormal(-2, 2),
  +         integrate_partialMoment(-2, 2)
  +     ),
  +     all.equal(
  +         partialMoment_standardNormal(-2, 3),
  +         integrate_partialMoment(-2, 3)
  +     ),
  +     all.equal(
  +         partialMoment_standardNormal(-2, 4),
  +         integrate_partialMoment(-2, 4)
  +     )
  + )
  > 
  > ## check Huber Proposal 2 implementation
  > huberPsiRcppProp2 <- psi2propII(huberPsiRcpp)
  > for (equation in c("location", "scale", "eta", "tau", "mu")) {
  +     dimension <- if (equation %in% c("location", "scale"))
  +         1
  +     else
  +         2
  +     stopifnot(all.equal(
  +         asymptoticVariance_huber_proposal2(huberPsiRcppProp2, equation, dimension),
  +         asymptoticVariance_generic(huberPsiRcppProp2, equation, dimension),
  +         tolerance = 1e-3
  +     ))
  + }
  > 
  > proc.time()
     user  system elapsed 
     2.45    0.35    2.79 
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, control=lmerControl(optimizer="bobyqa"))
  +     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")
  +                  ranef.fm <- ranef(fm, condVar=FALSE)# lme4 now has default  condVar=TRUE
  +                  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")
  +     }
  + }
  > 
  > Dyestuff$Yield <- Dyestuff$Yield - 0.5
  > 
  > 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 2 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 2 (default)
  > fit(Yield ~ (1 | Batch), Dyestuff,
  +     rho.e = smoothPsi, rho.b = smoothPsi)
  
  ######## DASvar ########
  Time elapsed: 0.83 0 0.83 NA NA 
  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.32      22.04   69.25
  
  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 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (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: 0.54 0 0.57 NA NA 
  Robust linear mixed model fit by DAStau 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -1.2656 -0.6593  0.1234  0.6972  1.7041 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept) 2359     48.57   
   Residual             3059     55.31   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)  1526.34      22.82   66.88
  
  Robustness weights for the residuals: 
   25 weights are ~= 1. The remaining 5 ones are
      2     3     5    18    23 
  0.996 0.996 0.992 0.787 0.994 
  
  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 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
        A       B       C       D       E       F 
  -19.761   1.048  33.601 -29.717  66.229 -51.399 
  
  ################################################
  ################################################
  ################################################
  
  ################ results for DASvar  ##############
                      IRWLS    
  Coef                         
  (Intercept)         1526 (22)
                               
  VarComp                      
  (Intercept) | Batch 46.7     
                               
  sigma               54.2     
                               
  
  ################ results for DAStau  ##############
                      IRWLS      
  Coef                           
  (Intercept)         1526 (22.8)
                                 
  VarComp                        
  (Intercept) | Batch 48.6       
                                 
  sigma               55.3       
                                 
  > fit(Yield ~ (1 | Batch), Dyestuff2,
  +     rho.e = smoothPsi, rho.b = smoothPsi)
  
  ######## DASvar ########
  boundary (singular) fit: see help('isSingular')
  Time elapsed: 0.63 0 0.62 NA NA 
  Robust linear mixed model fit by DASvar 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
       Min       1Q   Median       3Q      Max 
  -1.62421 -0.71050 -0.06088  0.63520  1.95517 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept)  0.00    0.000   
   Residual             16.02    4.002   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)   5.6087     0.7495   7.484
  
  Robustness weights for the residuals: 
   24 weights are ~= 1. The remaining 6 ones are
      8     9    10    11    13    21 
  0.997 0.863 0.824 0.951 0.687 0.971 
  
  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 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
  A B C D E F 
  0 0 0 0 0 0 
  
  ######## DAStau ########
  boundary (singular) fit: see help('isSingular')
  Time elapsed: 0.59 0 0.61 NA NA 
  Robust linear mixed model fit by DAStau 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
       Min       1Q   Median       3Q      Max 
  -1.60162 -0.70046 -0.05976  0.62677  1.92861 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept)  0.00    0.000   
   Residual             16.47    4.058   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)   5.6075     0.7599   7.379
  
  Robustness weights for the residuals: 
   25 weights are ~= 1. The remaining 5 ones are
      9    10    11    13    21 
  0.874 0.835 0.960 0.697 0.979 
  
  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 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (Batch):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
  A B C D E F 
  0 0 0 0 0 0 
  
  ################################################
  ################################################
  ################################################
  
  ################ results for DASvar  ##############
                      IRWLS       
  Coef                            
  (Intercept)         5.61 (0.749)
                                  
  VarComp                         
  (Intercept) | Batch 0           
                                  
  sigma               4           
                                  
  
  ################ results for DAStau  ##############
                      IRWLS      
  Coef                           
  (Intercept)         5.61 (0.76)
                                 
  VarComp                        
  (Intercept) | Batch 0          
                                 
  sigma               4.06       
                                 
  > fit(diameter ~ (1|plate) + (1|sample), Penicillin,
  +     rho.e = smoothPsi, rho.b = smoothPsi)
  
  ######## DASvar ########
  Time elapsed: 0.44 0.03 0.47 NA NA 
  Robust linear mixed model fit by DASvar 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -2.2164 -0.6474  0.0528  0.5885  3.4337 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   plate    (Intercept) 0.8798   0.9380  
   sample   (Intercept) 4.3155   2.0774  
   Residual             0.2954   0.5435  
  Number of obs: 144, groups: plate, 24; sample, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)  23.0116     0.8929   25.77
  
  Robustness weights for the residuals: 
   122 weights are ~= 1. The remaining 22 ones are summarized as
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    0.392   0.669   0.843   0.822   0.978   0.999 
  
  Robustness weights for the random effects: 
   25 weights are ~= 1. The remaining 5 ones are
      7    13    19    24    30 
  0.893 0.853 0.893 0.982 0.905 
  
  Rho functions used for fitting:
    Residuals:
      eff: smoothed Huber (k = 1.345, s = 10) 
      sig: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (plate):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
    Random Effects, variance component 2 (sample):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
           a          b          c          d          e          f          g 
   4.436e-01  4.436e-01  1.241e-01  2.030e-01 -1.094e-06 -2.536e-01 -8.075e-01 
           h          i          j          k          l          m          n 
   4.872e-01 -4.441e-01 -4.541e-01  5.688e-01  2.945e-01  8.498e-01  2.945e-01 
           o          p          q          r          s          t          u 
   5.481e-01  2.012e-02 -1.615e-01 -1.623e-01 -8.075e-01  5.688e-01 -4.951e-01 
           v          w          x          A          B          C          D 
  -1.628e-01 -4.495e-01 -7.084e-01  5.551e-01 -2.672e-01  4.955e-01 -3.700e-02 
           E          F 
  -2.667e-02 -7.956e-01 
  
  ######## DAStau ########
  Time elapsed: 0.5 0 0.5 NA NA 
  Robust linear mixed model fit by DAStau 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
     Min     1Q Median     3Q    Max 
  -2.161 -0.642  0.057  0.574  3.333 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   plate    (Intercept) 0.9054   0.9515  
   sample   (Intercept) 4.5338   2.1293  
   Residual             0.3114   0.5581  
  Number of obs: 144, groups: plate, 24; sample, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)  23.0002     0.9148   25.14
  
  Robustness weights for the residuals: 
   126 weights are ~= 1. The remaining 18 ones are summarized as
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    0.404   0.684   0.838   0.802   0.920   0.997 
  
  Robustness weights for the random effects: 
   25 weights are ~= 1. The remaining 5 ones are
      7    13    19    24    30 
  0.906 0.866 0.906 0.989 0.926 
  
  Rho functions used for fitting:
    Residuals:
      eff: smoothed Huber (k = 1.345, s = 10) 
      sig: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
    Random Effects, variance component 1 (plate):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
    Random Effects, variance component 2 (sample):
      eff: smoothed Huber (k = 1.345, s = 10) 
      vcp: smoothed Huber, Proposal 2 (k = 1.345, s = 10) 
          a         b         c         d         e         f         g         h 
   0.450838  0.450838  0.128411  0.205545  0.000502 -0.256535 -0.815539  0.490628 
          i         j         k         l         m         n         o         p 
  -0.446899 -0.456519  0.575339  0.297994  0.858936  0.297994  0.554159  0.020649 
          q         r         s         t         u         v         w         x 
  -0.163812 -0.164206 -0.815539  0.575339 -0.501182 -0.164248 -0.451685 -0.717135 
          A         B         C         D         E         F 
   0.559397 -0.265494  0.499107 -0.034026 -0.023533 -0.794300 
  
  ################################################
  ################################################
  ################################################
  
  ################ results for DASvar  ##############
                       IRWLS     
  Coef                           
  (Intercept)          23 (0.893)
                                 
  VarComp                        
  (Intercept) | plate  0.938     
  (Intercept) | sample 2.077     
                                 
  sigma                0.543     
                                 
  
  ################ results for DAStau  ##############
                       IRWLS     
  Coef                           
  (Intercept)          23 (0.915)
                                 
  VarComp                        
  (Intercept) | plate  0.952     
  (Intercept) | sample 2.129     
                                 
  sigma                0.558     
                                 
  > 
  > if (FALSE) {
  +     ## correlated random effects
  +     fit(Reaction ~ Days + (Days|Subject), sleepstudy,
  +         methods = c("DASvar", "DAStau"))
  +     fit(Reaction ~ Days + (Days|Subject), sleepstudy,
  +         methods = c("DASvar", "DAStau"), init = lmerNoFit)
  +     ## robust
  +     fit(Reaction ~ Days + (Days|Subject), sleepstudy,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         methods = c("DASvar")) ##, "DAStau"))
  +     fit(Reaction ~ Days + (Days|Subject), sleepstudy,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         methods = c("DASvar"), ##, "DAStau"),
  +         init = lmerNoFit)
  + 
  +     ## ## including a 0 variance compontent
  +     sleepstudy2 <- within(sleepstudy, Group <- letters[1:4])
  +     fit(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +         methods = c("DASvar", "DAStau"))
  +     fit(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +         methods = c("DASvar", "DAStau"), init = lmerNoFit)
  +     ## robust
  +     fit(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         methods = c("DASvar")) ##, "DAStau"))
  +     fit(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +         rho.e = smoothPsi, rho.b = smoothPsi,
  +         methods = c("DASvar"), ##, "DAStau"),
  +         init = lmerNoFit)
  + }
  > 
  > cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
  Time elapsed:  7.14 0.31 7.42 NA NA 
  > 
  > proc.time()
     user  system elapsed 
     7.14    0.31    7.42 
Running the tests in 'tests/fitDatasets.R' failed.
Complete output:
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > isPackageInstalled <- function(package) {
  +     return(length(find.package(package, quiet = TRUE)) > 0)
  + }
  > 
  > 
  > set.seed(1)
  > oneWay <- generateAnovaDatasets(1, 1, 10, 4,
  +                                 lmeFormula = y ~ 1,
  +                                 heavyLmeRandom = ~ 1,
  +                                 heavyLmeGroups = ~ Var2,
  +                                 lqmmRandom = ~ 1,
  +                                 lqmmGroup = "Var2",
  +                                 groups = cbind(rep(1:4, each = 10), rep(1:10, 4)),
  +                                 varcov = matrix(1, 4, 4),
  +                                 lower = 0)
  > test <- function(result, expectedLength = 1) {
  +     stopifnot(length(result) == expectedLength,
  +               !is(result[[1]], "try-error"))
  +     print(result[[1]])
  + }
  > test(expected <- fitDatasets_lmer(oneWay))
  Linear mixed model fit by REML ['lmerMod']
  Formula: y ~ (1 | Var2)
     Data: data
  REML criterion at convergence: 211.4088
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups:  Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > test(fitDatasets_lmer_bobyqa(oneWay))
  Linear mixed model fit by REML ['lmerMod']
  Formula: y ~ (1 | Var2)
     Data: data
  REML criterion at convergence: 211.4088
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups:  Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > test(fitDatasets_lmer_Nelder_Mead(oneWay))
  Linear mixed model fit by REML ['lmerMod']
  Formula: y ~ (1 | Var2)
     Data: data
  REML criterion at convergence: 211.4088
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups:  Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > fitDatasets_rlmer_custom <- function(datasets) {
  +     return(fitDatasets_rlmer(datasets,
  +                              method = "DASvar",
  +                              tuningParameter = c(1.345, 2.28, 1.345, 2.28, 5.14, 5.14),
  +                              label = "fitDatasets_rlmer_custom"))
  + }
  > test(fitDatasets_rlmer_custom(oneWay))
  Robust linear mixed model fit by DASvar 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.516   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.046  
  > test(fitDatasets_rlmer_DAStau(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.529   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.046  
  > test(fitDatasets_rlmer_DAStau_lmerNoFit(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.529   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.046  
  > test(fitDatasets_rlmer_DASvar(oneWay))
  Robust linear mixed model fit by DASvar 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.516   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.046  
  > test(fitDatasets_rlmer_DAStau_noAdj(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.404   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.047  
  > test(fitDatasets_rlmer_DAStau_k_0_5(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.00    
   Residual             3.41    
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        2.109  
  > test(fitDatasets_rlmer_DAStau_k_0_5_noAdj(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 0.000   
   Residual             3.003   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
         2.13  
  > test(fitDatasets_rlmer_DAStau_k_2(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.499   
   Residual             3.247   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        1.919  
  > test(fitDatasets_rlmer_DAStau_k_2_noAdj(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.664   
   Residual             3.203   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        1.914  
  > test(fitDatasets_rlmer_DAStau_k_5(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > test(fitDatasets_rlmer_DAStau_k_5_noAdj(oneWay))
  Robust linear mixed model fit by DAStau 
  Formula: y ~ (1 | Var2) 
     Data: data 
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups: Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > if (isPackageInstalled("heavy")) {
  +     test(fitDatasets_heavyLme(oneWay))
  + }
  > if (isPackageInstalled("lqmm")) {
  +     test(fitDatasets_lqmm(oneWay))
  + }
  Call: lqmm::lqmm(fixed = y ~ 1, random = ~1, group = "Var2", covariance = "pdDiag", 
      data = data)
  
  Quantile 0.5 
  
  Fixed effects:
  (Intercept)  
        2.154  
  
  Covariance matrix of the random effects:
  (Intercept) 
        2.189 
  
  Residual scale parameter: 1.213 (standard deviation 3.432)
  Log-likelihood: -106.4 
  
  Number of observations: 40 
  Number of groups: 10 
  > ## if (isPackageInstalled("rlme")) {
  > ##     test(fitDatasets_rlme(oneWay)) # won't work as dataset is balanced
  > ## }
  > if (isPackageInstalled("robustvarComp")) {
  +     fitDatasets_varComprob_custom <- function(datasets, postFit) {
  +         lcontrol <- robustvarComp::varComprob.control(lower = datasets[["lower"]])
  +         return(
  +             fitDatasets_varComprob(
  +                 datasets,
  +                 lcontrol,
  +                 "fitDatasets_varComprob_custom",
  +                 postFit = postFit
  +             )
  +         )
  +     }
  +     test(fitDatasets_varComprob_custom(oneWay))
  +     test(fitDatasets_varComprob_compositeTau(oneWay))
  +     test(fitDatasets_varComprob_compositeTau_OGK(oneWay))
  +     test(fitDatasets_varComprob_compositeTau_2SGS(oneWay))
  +     test(fitDatasets_varComprob_compositeS(oneWay))
  +     test(fitDatasets_varComprob_compositeS_OGK(oneWay))
  +     test(fitDatasets_varComprob_compositeS_2SGS(oneWay))
  +     test(fitDatasets_varComprob_S(oneWay))
  +     test(fitDatasets_varComprob_S_OGK(oneWay))
  +     test(fitDatasets_varComprob_S_2SGS(oneWay))
  + }
  
   Method:  compositeTau 
  
  Fixed effects: 
  (Intercept) 
      1.90939 
  Random effect variances: 
  [1] 0.5533093
  Residual variance: 
  error variance 
        11.13874 
  Value of the objective function at convergence: 
  [1] 8.217236
  
   Method:  compositeTau 
  
  Fixed effects: 
  (Intercept) 
      1.90939 
  Random effect variances: 
  [1] 0.5533093
  Residual variance: 
  error variance 
        11.13874 
  Value of the objective function at convergence: 
  [1] 8.217236
  
   Method:  compositeTau 
  
  Fixed effects: 
  (Intercept) 
      1.90939 
  Random effect variances: 
  [1] 0.5533084
  Residual variance: 
  error variance 
        11.13874 
  Value of the objective function at convergence: 
  [1] 8.217236
  
   Method:  compositeTau 
  
  Fixed effects: 
  (Intercept) 
      1.90939 
  Random effect variances: 
  [1] 0.5533086
  Residual variance: 
  error variance 
        11.13874 
  Value of the objective function at convergence: 
  [1] 8.217236
  
   Method:  compositeS 
  
  Fixed effects: 
  (Intercept) 
     2.299836 
  Random effect variances: 
  [1] 1.472417
  Residual variance: 
  error variance 
        9.873617 
  Value of the objective function at convergence: 
  [1] 33.56952
  
   Method:  compositeS 
  
  Fixed effects: 
  (Intercept) 
     2.299836 
  Random effect variances: 
  [1] 1.472418
  Residual variance: 
  error variance 
        9.873616 
  Value of the objective function at convergence: 
  [1] 33.56952
  
   Method:  compositeS 
  
  Fixed effects: 
  (Intercept) 
     2.299836 
  Random effect variances: 
  [1] 1.472419
  Residual variance: 
  error variance 
        9.873615 
  Value of the objective function at convergence: 
  [1] 33.56952
  
   Method:  S 
  
  Fixed effects: 
  (Intercept) 
     1.848618 
  Random effect variances: 
  [1] 0
  Residual variance: 
  error variance 
        19.50105 
  Value of the objective function at convergence: 
  [1] 69.37515
  
   Method:  S 
  
  Fixed effects: 
  (Intercept) 
     1.848617 
  Random effect variances: 
  [1] 0
  Residual variance: 
  error variance 
        19.50105 
  Value of the objective function at convergence: 
  [1] 69.37515
  
   Method:  S 
  
  Fixed effects: 
  (Intercept) 
     1.848617 
  Random effect variances: 
  [1] 0
  Residual variance: 
  error variance 
        19.50105 
  Value of the objective function at convergence: 
  [1] 69.37515
  > 
  > ## test datasetIndices argument
  > 
  > set.seed(1)
  > oneWay3 <- generateAnovaDatasets(3, 1, 10, 4,
  +                                  lmeFormula = y ~ 1,
  +                                  heavyLmeRandom = ~ 1,
  +                                  heavyLmeGroups = ~ Var2,
  +                                  lqmmRandom = ~ 1,
  +                                  lqmmGroup = "Var2",
  +                                  groups = cbind(rep(1:4, each = 10), rep(1:10, 4)),
  +                                  varcov = matrix(1, 4, 4),
  +                                  lower = 0)
  > 
  > test(actual <- fitDatasets_lmer(oneWay3, datasetIndices = 1))
  Linear mixed model fit by REML ['lmerMod']
  Formula: y ~ (1 | Var2)
     Data: data
  REML criterion at convergence: 211.4088
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 1.632   
   Residual             3.195   
  Number of obs: 40, groups:  Var2, 10
  Fixed Effects:
  (Intercept)  
        1.899  
  > stopifnot(all.equal(expected, actual, check.attributes = FALSE))
  > 
  > test(fitDatasets_lmer(oneWay3, datasetIndices = 2:3), expectedLength = 2)
  Linear mixed model fit by REML ['lmerMod']
  Formula: y ~ (1 | Var2)
     Data: data
  REML criterion at convergence: 238.2448
  Random effects:
   Groups   Name        Std.Dev.
   Var2     (Intercept) 4.455   
   Residual             3.980   
  Number of obs: 40, groups:  Var2, 10
  Fixed Effects:
  (Intercept)  
        2.017  
  > 
  > ## test rlme implementation
  > if (require(rlme)) {
  + 
  +     data(schools)
  +     datasets <- createDatasetsFromList(list(schools),
  +                                        formula = y ~ 1 + sex + age + (1 | region) + (1 | region:school),
  +                                        trueBeta = rep(NA_real_, 3),
  +                                        trueSigma = NA_real_,
  +                                        trueTheta = rep(NA_real_, 2))
  +     fits <- fitDatasets_rlme(datasets)
  +     result <- processFit(fits[[1]], all = TRUE)
  +     stopifnot(length(result$coefficients) == 3,
  +               length(result$standardErrors) == 3,
  +               length(result$tValues) == 3,
  +               length(result$sigma) == 1,
  +               length(result$thetas) == 2,
  +               length(result$residuals) == NROW(schools))
  + }
  Loading required package: rlme
  > 
  > 
  > proc.time()
     user  system elapsed 
    20.14    0.60   20.75 
Running the tests in 'tests/genericFunctions.R' failed.
Complete output:
  > ## test the availability of generic functions.
  > ae <- function(target, current, ...) {
  +     ret <- all.equal(target, current, ...)
  +     if (isTRUE(ret)) return(ret)
  +     print(ret)
  +     stop("Objects not equal")
  + }
  > chgClass <- function(object) {
  +     class(object) <- sub("(merMod|mer)", "rlmerMod", class(object))
  +     object
  + }
  > 
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > 
  > set.seed(3)
  > sleepstudy2 <- within(sleepstudy, {
  +     Group <- letters[1:4]
  +     Covar <- rnorm(180)
  + })
  > rfm <- rlmer(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +              rho.e = cPsi, rho.b = cPsi, doFit=FALSE)
  boundary (singular) fit: see help('isSingular')
  > fm <- lmer(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2)
  boundary (singular) fit: see help('isSingular')
  > ## all three print the same:
  > print(rfm)
  Unfitted rlmerMod object. Use update(object, doFit=TRUE) to fit it.
  > show(rfm)
  Unfitted rlmerMod object. Use update(object, doFit=TRUE) to fit it.
  > summary(rfm)
  Unfitted rlmerMod object. Use update(object, doFit=TRUE) to fit it.
  > 
  > ## object information
  > ## ae(df.residual(fm), df.residual(rfm))
  > ae(formula(fm), formula(rfm))
  [1] TRUE
  > stopifnot(isLMM(rfm))
  > stopifnot(isREML(rfm))
  > ae(model.frame(fm), model.frame(rfm))
  [1] TRUE
  > ae(model.matrix(fm), model.matrix(rfm), check.attributes=FALSE)
  [1] TRUE
  > nobs(rfm)
  [1] 180
  > ## ae(getInitial(fm), getInitial(rfm))
  > ae(terms(fm), terms(rfm))
  [1] TRUE
  > weights(rfm)
    [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
   [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
   [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  [112] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  [149] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  > 
  > ## basic accessors for the results
  > ae(chgClass(coef(fm)), coef(rfm))
  [1] TRUE
  > ## dummy.coef(rfm)
  > stopifnot(inherits(try(deviance(rfm), silent=TRUE), "try-error"))
  > stopifnot(inherits(try(extractAIC(rfm), silent=TRUE), "try-error"))
  > family(rfm)
  
  Family: gaussian 
  Link function: identity 
  
  > ## after version 1.1 fitted values are named
  > if (packageVersion("lme4") > "1.1") ae(fitted(fm), fitted(rfm))
  [1] TRUE
  > ae(fixef(fm), fixef(rfm))
  [1] TRUE
  > stopifnot(inherits(try(logLik(rfm), silent=TRUE), "try-error"))
  > ae(chgClass(ranef(fm, condVar=FALSE)), ranef(rfm))
  [1] TRUE
  > ## after version 1.1 fitted values are named
  > if (packageVersion("lme4") > "1.1") ae(resid(fm), resid(rfm))
  [1] TRUE
  > ae(sigma(fm), sigma(rfm))
  [1] TRUE
  > ## weighted.residuals(rfm)
  > 
  > ## var-covar methods
  > ## VarCorr(rfm)
  > ae(chgClass(VarCorr(fm)), VarCorr(rfm))
  [1] TRUE
  > ae(vcov(fm), vcov(rfm), tolerance=1e-4)
  [1] TRUE
  > ## vcov(rfm)
  > 
  > ## confidence intervals
  > ## confint(rfm)
  > 
  > ## other (deprecated?)
  > theta(rfm)
       Subject.(Intercept) Subject.Days.(Intercept)             Subject.Days 
                 0.9667371                0.0151686                0.2309095 
         Group.(Intercept) 
                 0.0000000 
  > 
  > ## other methods
  > getInfo(rfm)
  $data
  sleepstudy2
  
  $coef
  (Intercept)        Days 
    251.40510    10.46729 
  
  $stderr
  (Intercept)        Days 
     6.824576    1.545788 
  
  $varcomp
  (Intercept) | Subject        Days | Subject   (Intercept) | Group 
              24.740552              5.922129              0.000000 
  
  $sigma
  [1] 25.59181
  
  $correlations
  (Intercept) x Days | Subject 
                    0.06554938 
  
  $rho.e
  [1] "classic"
  
  $rho.sigma.e
  [1] "classic"
  
  $rho.b_1
  [1] "classic"
  
  $rho.sigma.b_1
  [1] "classic"
  
  $rho.b_2
  [1] "classic"
  
  $rho.sigma.b_2
  [1] "classic"
  
  > compare(fm, rfm)
                               fm           rfm         
  Coef                                                  
  (Intercept)                  251.4 (6.82) 251.4 (6.82)
  Days                          10.5 (1.55)  10.5 (1.55)
                                                        
  VarComp                                               
  (Intercept) | Subject        24.74        24.74       
  Days | Subject                5.92         5.92       
  (Intercept) | Group           0.00         0.00       
                                                        
  Correlations                                          
  (Intercept) x Days | Subject 0.0655       0.0655      
                                                        
  sigma                        25.6         25.6        
                                                        
  REML                         1744                     
  rho.e                                     classic     
  rho.sigma.e                               classic     
  rho.b_1                                   classic     
  rho.sigma.b_1                             classic     
  rho.b_2                                   classic     
  rho.sigma.b_2                             classic     
  > update(rfm, ~ . + Covar)
  boundary (singular) fit: see help('isSingular')
  Unfitted rlmerMod object. Use update(object, doFit=TRUE) to fit it.
  > 
  > ## predict method (various examples)
  > ae(predict(fm), predict(rfm))
  [1] TRUE
  > if (packageVersion("lme4") > "1.1") {
  +     ae(predict(fm,re.form=NA), predict(rfm,re.form=NA))
  +     newdata <- with(sleepstudy, expand.grid(Subject=unique(Subject),
  +                                             Days=3:5, Group=letters[1:2]))
  +     ae(predict(fm,newdata), predict(rfm,newdata))
  +     ae(predict(fm,newdata,re.form=NA), predict(rfm,newdata,re.form=NA))
  +     ae(predict( fm,newdata, re.form=~(1|Subject)),
  +        predict(rfm,newdata, re.form=~(1|Subject)))
  + }
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     3.21    0.25    3.46 
Running the tests in 'tests/getME.R' failed.
Complete output:
  > ## testing getME function
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > formatNum <- function(x, ...)
  +      format(round(x, 8), trim = TRUE, drop0trailing = TRUE, ...)
  > options(str = strOptions(formatNum = formatNum))
  > 
  > sleepstudy2 <- within(sleepstudy, Group <- letters[1:4])
  > rfm <- rlmer(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +              rho.e = smoothPsi, rho.b=smoothPsi,
  +              rho.sigma.e = psi2propII(smoothPsi, k=2.28),
  +              rho.sigma.b = psi2propII(smoothPsi, k=2.28),
  +              init = lmer(Reaction ~ Days + (Days|Subject) + (1|Group), sleepstudy2,
  +                          control=lmerControl(optimizer="bobyqa")),
  +              doFit=FALSE)
  boundary (singular) fit: see help('isSingular')
  > 
  > (nmME <- eval(formals(robustlmm:::getME.rlmerMod)$name))
   [1] "X"                "Z"                "Zt"               "Ztlist"          
   [5] "mmList"           "y"                "mu"               "u"               
   [9] "b.s"              "b"                "Gp"               "Tp"              
  [13] "Lambda"           "Lambdat"          "Tlist"            "A"               
  [17] "U_b"              "Lind"             "sigma"            "flist"           
  [21] "fixef"            "beta"             "theta"            "ST"              
  [25] "is_REML"          "n_rtrms"          "n_rfacs"          "N"               
  [29] "n"                "p"                "q"                "p_i"             
  [33] "l_i"              "q_i"              "k"                "m_i"             
  [37] "m"                "cnms"             "devcomp"          "offset"          
  [41] "lower"            "rho_e"            "rho_b"            "rho_sigma_e"     
  [45] "rho_sigma_b"      "M"                "w_e"              "w_b"             
  [49] "w_b_vector"       "w_sigma_e"        "w_sigma_b"        "w_sigma_b_vector"
  > for (nm in nmME) {
  +     cat("\nName:", nm, "\n")
  +     value <- getME(rfm, name=nm)
  +     if (nm == "theta") {
  +         value <- value + 1
  +     } else if (nm == "A") {
  +         value@x <- value@x + 1
  +     }
  +     if (substr(nm, 1, 3) == "rho") {
  +        print(value)
  +     } else {
  +        str(value)
  +     }
  + }
  
  Name: X 
   num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
   - attr(*, "dimnames")=List of 2
    ..$ : chr [1:180] "1" "2" "3" "4" ...
    ..$ : chr [1:2] "(Intercept)" "Days"
   - attr(*, "assign")= int [1:2] 0 1
   - attr(*, "msgScaleX")= chr(0) 
  
  Name: Z 
  Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..@ i       : int [1:522] 0 1 2 3 4 5 6 7 8 9 ...
    ..@ p       : int [1:41] 0 10 19 29 38 48 57 67 76 86 ...
    ..@ Dim     : int [1:2] 180 40
    ..@ Dimnames:List of 2
    .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..$ : chr [1:40] "308" "308" "309" "309" ...
    ..@ x       : num [1:522] 1 1 1 1 1 1 1 1 1 1 ...
    ..@ factors : list()
  
  Name: Zt 
  Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..@ i       : int [1:522] 0 36 0 1 37 0 1 38 0 1 ...
    ..@ p       : int [1:181] 0 2 5 8 11 14 17 20 23 26 ...
    ..@ Dim     : int [1:2] 40 180
    ..@ Dimnames:List of 2
    .. ..$ : chr [1:40] "308" "308" "309" "309" ...
    .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    ..@ x       : num [1:522] 1 1 1 1 1 1 2 1 1 3 ...
    ..@ factors : list()
  
  Name: Ztlist 
  List of 3
   $ Subject.(Intercept):Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    .. ..@ i       : int [1:180] 0 0 0 0 0 0 0 0 0 0 ...
    .. ..@ p       : int [1:181] 0 1 2 3 4 5 6 7 8 9 ...
    .. ..@ Dim     : int [1:2] 18 180
    .. ..@ Dimnames:List of 2
    .. .. ..$ : chr [1:18] "308" "309" "310" "330" ...
    .. .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..@ x       : num [1:180] 1 1 1 1 1 1 1 1 1 1 ...
    .. ..@ factors : list()
   $ Subject.Days       :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    .. ..@ i       : int [1:162] 0 0 0 0 0 0 0 0 0 1 ...
    .. ..@ p       : int [1:181] 0 0 1 2 3 4 5 6 7 8 ...
    .. ..@ Dim     : int [1:2] 18 180
    .. ..@ Dimnames:List of 2
    .. .. ..$ : chr [1:18] "308" "309" "310" "330" ...
    .. .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..@ x       : num [1:162] 1 2 3 4 5 6 7 8 9 1 ...
    .. ..@ factors : list()
   $ Group.(Intercept)  :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    .. ..@ i       : int [1:180] 0 1 2 3 0 1 2 3 0 1 ...
    .. ..@ p       : int [1:181] 0 1 2 3 4 5 6 7 8 9 ...
    .. ..@ Dim     : int [1:2] 4 180
    .. ..@ Dimnames:List of 2
    .. .. ..$ : chr [1:4] "a" "b" "c" "d"
    .. .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..@ x       : num [1:180] 1 1 1 1 1 1 1 1 1 1 ...
    .. ..@ factors : list()
  
  Name: mmList 
  List of 2
   $ Days | Subject: num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
    ..- attr(*, "dimnames")=List of 2
    .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..$ : chr [1:2] "(Intercept)" "Days"
    ..- attr(*, "assign")= int [1:2] 0 1
   $ 1 | Group     : num [1:180, 1] 1 1 1 1 1 1 1 1 1 1 ...
    ..- attr(*, "dimnames")=List of 2
    .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    .. ..$ : chr "(Intercept)"
    ..- attr(*, "assign")= int 0
  
  Name: y 
   num [1:180] 250 259 251 321 357 ...
  
  Name: mu 
   num [1:180] 254 273 293 313 332 ...
  
  Name: u 
   num [1:40] 2.34 39.68 -41.79 -34.58 -40.3 ...
  
  Name: b.s 
   num [1:40] 2.34 39.68 -41.79 -34.58 -40.3 ...
  
  Name: b 
   Named num [1:40] 2.26 9.2 -40.4 -8.62 -38.96 ...
   - attr(*, "names")= chr [1:40] "308" "308" "309" "309" ...
  
  Name: Gp 
   int [1:3] 0 36 40
  
  Name: Tp 
   Named num [1:3] 0 3 4
   - attr(*, "names")= chr [1:3] "beg__" "Subject" "Group"
  
  Name: Lambda 
  Formal class 'dtCMatrix' [package "Matrix"] with 7 slots
    ..@ i       : int [1:58] 0 1 1 2 3 3 4 5 5 6 ...
    ..@ p       : int [1:41] 0 2 3 5 6 8 9 11 12 14 ...
    ..@ Dim     : int [1:2] 40 40
    ..@ Dimnames:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
    ..@ x       : num [1:58] 0.9667 0.0152 0.2309 0.9667 0.0152 ...
    ..@ uplo    : chr "L"
    ..@ diag    : chr "N"
  
  Name: Lambdat 
  Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..@ i       : int [1:58] 0 0 1 2 2 3 4 4 5 6 ...
    ..@ p       : int [1:41] 0 1 3 4 6 7 9 10 12 13 ...
    ..@ Dim     : int [1:2] 40 40
    ..@ Dimnames:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
    ..@ x       : num [1:58] 0.9667 0.0152 0.2309 0.9667 0.0152 ...
    ..@ factors : list()
  
  Name: Tlist 
  List of 2
   $ Subject: num [1:2, 1:2] 0.9667 0.0152 0 0.2309
   $ Group  : num [1, 1] 0
  
  Name: A 
  Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..@ i       : int [1:522] 0 36 0 1 37 0 1 38 0 1 ...
    ..@ p       : int [1:181] 0 2 5 8 11 14 17 20 23 26 ...
    ..@ Dim     : int [1:2] 40 180
    ..@ Dimnames:List of 2
    .. ..$ : NULL
    .. ..$ : chr [1:180] "1" "2" "3" "4" ...
    ..@ x       : num [1:522] 1.97 1 1.98 1.23 1 ...
    ..@ factors : list()
  
  Name: U_b 
  Formal class 'dtCMatrix' [package "Matrix"] with 7 slots
    ..@ i       : int [1:58] 0 1 1 2 3 3 4 5 5 6 ...
    ..@ p       : int [1:41] 0 2 3 5 6 8 9 11 12 14 ...
    ..@ Dim     : int [1:2] 40 40
    ..@ Dimnames:List of 2
    .. ..$ : NULL
    .. ..$ : NULL
    ..@ x       : num [1:58] 0.9667 0.0152 0.2309 0.9667 0.0152 ...
    ..@ uplo    : chr "L"
    ..@ diag    : chr "N"
  
  Name: Lind 
   int [1:58] 1 2 3 1 2 3 1 2 3 1 ...
  
  Name: sigma 
   num 25.6
  
  Name: flist 
  List of 2
   $ Subject: Factor w/ 18 levels "308","309","310",..: 1 1 1 1 1 1 1 1 1 1 ...
   $ Group  : Factor w/ 4 levels "a","b","c","d": 1 2 3 4 1 2 3 4 1 2 ...
   - attr(*, "assign")= int [1:2] 1 2
  
  Name: fixef 
   Named num [1:2] 251.4 10.5
   - attr(*, "names")= chr [1:2] "(Intercept)" "Days"
  
  Name: beta 
   num [1:2] 251.4 10.5
  
  Name: theta 
   Named num [1:4] 1.97 1.02 1.23 1
   - attr(*, "names")= chr [1:4] "Subject.(Intercept)" "Subject.Days.(Intercept)" "Subject.Days" "Group.(Intercept)"
  
  Name: ST 
  List of 2
   $ Subject: num [1:2, 1:2] 0.9667 0.0157 0 0.2309
   $ Group  : num [1, 1] 0
  
  Name: is_REML 
   logi 1
  
  Name: n_rtrms 
   int 2
  
  Name: n_rfacs 
   int 2
  
  Name: N 
   int 180
  
  Name: n 
   int 180
  
  Name: p 
   int 2
  
  Name: q 
   int 40
  
  Name: p_i 
   Named int [1:2] 2 1
   - attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
  
  Name: l_i 
   Named int [1:2] 18 4
   - attr(*, "names")= chr [1:2] "Subject" "Group"
  
  Name: q_i 
   Named int [1:2] 36 4
   - attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
  
  Name: k 
   int 2
  
  Name: m_i 
   Named num [1:2] 3 1
   - attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
  
  Name: m 
   int 4
  
  Name: cnms 
  List of 2
   $ Subject: chr [1:2] "(Intercept)" "Days"
   $ Group  : chr "(Intercept)"
  
  Name: devcomp 
  List of 2
   $ cmp : Named num [1:10] NA NA NA NA NA ...
    ..- attr(*, "names")= chr [1:10] "ldL2" "ldRX2" "wrss" "ussq" ...
   $ dims: Named int [1:12] 180 180 2 178 40 4 1 2 0 2 ...
    ..- attr(*, "names")= chr [1:12] "N" "n" "p" "nmp" ...
  
  Name: offset 
   num [1:180] 0 0 0 0 0 0 0 0 0 0 ...
  
  Name: lower 
   Named num [1:4] 0 -Inf 0 0
   - attr(*, "names")= chr [1:4] "Subject.(Intercept)" "Subject.Days.(Intercept)" "Subject.Days" "Group.(Intercept)"
  
  Name: rho_e 
  smoothed Huber psi function (k = 1.345, s = 10) 
  
  Name: rho_b 
  $Subject
  smoothed Huber psi function (k = 1.345, s = 10) 
  
  $Group
  smoothed Huber psi function (k = 1.345, s = 10) 
  
  
  Name: rho_sigma_e 
  smoothed Huber, Proposal 2 psi function (k = 2.28, s = 10) 
  
  Name: rho_sigma_b 
  $Subject
  smoothed Huber, Proposal 2 psi function (k = 2.28, s = 10) 
  
  $Group
  smoothed Huber, Proposal 2 psi function (k = 2.28, s = 10) 
  
  
  Name: M 
  List of 5
   $ M_bb.:Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    .. ..@ Dim     : int [1:2] 40 40
    .. ..@ Dimnames:List of 2
    .. .. ..$ : NULL
    .. .. ..$ : NULL
    .. ..@ x       : num [1:1600] 9.105 8.529 -0.487 -0.502 -0.487 ...
    .. ..@ factors :List of 1
    .. .. ..$ denseLU:Formal class 'denseLU' [package "Matrix"] with 4 slots
    .. .. .. .. ..@ x       : num [1:1600] 9.105 0.9367 -0.0535 -0.0551 -0.0535 ...
    .. .. .. .. ..@ perm    : int [1:40] 1 2 3 4 5 6 7 8 9 10 ...
    .. .. .. .. ..@ Dim     : int [1:2] 40 40
    .. .. .. .. ..@ Dimnames:List of 2
    .. .. .. .. .. ..$ : NULL
    .. .. .. .. .. ..$ : NULL
   $ M_XZ :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    .. ..@ Dim     : int [1:2] 2 40
    .. ..@ Dimnames:List of 2
    .. .. ..$ : chr [1:2] "(Intercept)" "Days"
    .. .. ..$ : NULL
    .. ..@ x       : num [1:80] 8.46 39.11 8.5 53.81 8.46 ...
    .. ..@ factors : list()
   $ M_bB :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    .. ..@ Dim     : int [1:2] 40 2
    .. ..@ Dimnames:List of 2
    .. .. ..$ : NULL
    .. .. ..$ : chr [1:2] "(Intercept)" "Days"
    .. ..@ x       : num [1:80] -0.0657 0 -0.0657 0 -0.0657 ...
    .. ..@ factors : list()
   $ M_BB :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    .. ..@ Dim     : int [1:2] 2 2
    .. ..@ Dimnames:List of 2
    .. .. ..$ : chr [1:2] "(Intercept)" "Days"
    .. .. ..$ : NULL
    .. ..@ x       : num [1:4] 0.08697 -0.00271 -0.00271 0.00446
    .. ..@ factors : list()
   $ M_bb :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    .. ..@ Dim     : int [1:2] 40 40
    .. ..@ Dimnames:List of 2
    .. .. ..$ : NULL
    .. .. ..$ : NULL
    .. ..@ x       : num [1:1600] 0.3429 -0.1875 0.0518 0.011 0.0518 ...
    .. ..@ factors : list()
  
  Name: w_e 
   num [1:180] 1 1 0.812 1 1 ...
  
  Name: w_b 
  List of 2
   $ Subject:'data.frame':	18 obs. of  2 variables:
    ..$ (Intercept): num [1:18] 0.557 0.299 0.427 0.794 1 ...
    ..$ Days       : num [1:18] 0.557 0.299 0.427 0.794 1 ...
   $ Group  :'data.frame':	4 obs. of  1 variable:
    ..$ (Intercept): num [1:4] 1 1 1 1
  
  Name: w_b_vector 
   num [1:40] 0.557 0.557 0.299 0.299 0.427 ...
  
  Name: w_sigma_e 
   num [1:180] 1 1 1 1 1 ...
  
  Name: w_sigma_b 
  List of 2
   $ Subject:'data.frame':	18 obs. of  2 variables:
    ..$ (Intercept): num [1:18] 0.878 0.258 0.524 1 1 ...
    ..$ Days       : num [1:18] 0.878 0.258 0.524 1 1 ...
   $ Group  :'data.frame':	4 obs. of  1 variable:
    ..$ (Intercept): num [1:4] 1 1 1 1
  
  Name: w_sigma_b_vector 
   num [1:40] 0.878 0.878 0.258 0.258 0.524 ...
  > g.all <- getME(rfm, "ALL")
  > g.all[grepl("^rho", names(g.all))] <- NULL
  > g.all[["theta"]] <- g.all[["theta"]] + 1
  > str(g.all, max.level = 2)
  List of 48
   $ X               : num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
    ..- attr(*, "dimnames")=List of 2
    ..- attr(*, "assign")= int [1:2] 0 1
    ..- attr(*, "msgScaleX")= chr(0) 
   $ Z               :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
   $ Zt              :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
   $ Ztlist          :List of 3
    ..$ Subject.(Intercept):Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..$ Subject.Days       :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
    ..$ Group.(Intercept)  :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
   $ mmList          :List of 2
    ..$ Days | Subject: num [1:180, 1:2] 1 1 1 1 1 1 1 1 1 1 ...
    .. ..- attr(*, "dimnames")=List of 2
    .. ..- attr(*, "assign")= int [1:2] 0 1
    ..$ 1 | Group     : num [1:180, 1] 1 1 1 1 1 1 1 1 1 1 ...
    .. ..- attr(*, "dimnames")=List of 2
    .. ..- attr(*, "assign")= int 0
   $ y               : num [1:180] 250 259 251 321 357 ...
   $ mu              : num [1:180] 254 273 293 313 332 ...
   $ u               : num [1:40] 2.34 39.68 -41.79 -34.58 -40.3 ...
   $ b.s             : num [1:40] 2.34 39.68 -41.79 -34.58 -40.3 ...
   $ b               : Named num [1:40] 2.26 9.2 -40.4 -8.62 -38.96 ...
    ..- attr(*, "names")= chr [1:40] "308" "308" "309" "309" ...
   $ Gp              : int [1:3] 0 36 40
   $ Tp              : Named num [1:3] 0 3 4
    ..- attr(*, "names")= chr [1:3] "beg__" "Subject" "Group"
   $ Lambda          :Formal class 'dtCMatrix' [package "Matrix"] with 7 slots
   $ Lambdat         :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
   $ Tlist           :List of 2
    ..$ Subject: num [1:2, 1:2] 0.9667 0.0152 0 0.2309
    ..$ Group  : num [1, 1] 0
   $ A               :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
   $ U_b             :Formal class 'dtCMatrix' [package "Matrix"] with 7 slots
   $ Lind            : int [1:58] 1 2 3 1 2 3 1 2 3 1 ...
   $ sigma           : num 25.6
   $ flist           :List of 2
    ..$ Subject: Factor w/ 18 levels "308","309","310",..: 1 1 1 1 1 1 1 1 1 1 ...
    ..$ Group  : Factor w/ 4 levels "a","b","c","d": 1 2 3 4 1 2 3 4 1 2 ...
    ..- attr(*, "assign")= int [1:2] 1 2
   $ fixef           : Named num [1:2] 251.4 10.5
    ..- attr(*, "names")= chr [1:2] "(Intercept)" "Days"
   $ beta            : num [1:2] 251.4 10.5
   $ theta           : Named num [1:4] 1.97 1.02 1.23 1
    ..- attr(*, "names")= chr [1:4] "Subject.(Intercept)" "Subject.Days.(Intercept)" "Subject.Days" "Group.(Intercept)"
   $ ST              :List of 2
    ..$ Subject: num [1:2, 1:2] 0.9667 0.0157 0 0.2309
    ..$ Group  : num [1, 1] 0
   $ is_REML         : logi 1
   $ n_rtrms         : int 2
   $ n_rfacs         : int 2
   $ N               : int 180
   $ n               : int 180
   $ p               : int 2
   $ q               : int 40
   $ p_i             : Named int [1:2] 2 1
    ..- attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
   $ l_i             : Named int [1:2] 18 4
    ..- attr(*, "names")= chr [1:2] "Subject" "Group"
   $ q_i             : Named int [1:2] 36 4
    ..- attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
   $ k               : int 2
   $ m_i             : Named num [1:2] 3 1
    ..- attr(*, "names")= chr [1:2] "Days | Subject" "1 | Group"
   $ m               : int 4
   $ cnms            :List of 2
    ..$ Subject: chr [1:2] "(Intercept)" "Days"
    ..$ Group  : chr "(Intercept)"
   $ devcomp         :List of 2
    ..$ cmp : Named num [1:10] NA NA NA NA NA ...
    .. ..- attr(*, "names")= chr [1:10] "ldL2" "ldRX2" "wrss" "ussq" ...
    ..$ dims: Named int [1:12] 180 180 2 178 40 4 1 2 0 2 ...
    .. ..- attr(*, "names")= chr [1:12] "N" "n" "p" "nmp" ...
   $ offset          : num [1:180] 0 0 0 0 0 0 0 0 0 0 ...
   $ lower           : Named num [1:4] 0 -Inf 0 0
    ..- attr(*, "names")= chr [1:4] "Subject.(Intercept)" "Subject.Days.(Intercept)" "Subject.Days" "Group.(Intercept)"
   $ M               :List of 5
    ..$ M_bb.:Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    ..$ M_XZ :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    ..$ M_bB :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    ..$ M_BB :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
    ..$ M_bb :Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
   $ w_e             : num [1:180] 1 1 0.812 1 1 ...
   $ w_b             :List of 2
    ..$ Subject:'data.frame':	18 obs. of  2 variables:
    ..$ Group  :'data.frame':	4 obs. of  1 variable:
   $ w_b_vector      : num [1:40] 0.557 0.557 0.299 0.299 0.427 ...
   $ w_sigma_e       : num [1:180] 1 1 1 1 1 ...
   $ w_sigma_b       :List of 2
    ..$ Subject:'data.frame':	18 obs. of  2 variables:
    ..$ Group  :'data.frame':	4 obs. of  1 variable:
   $ w_sigma_b_vector: num [1:40] 0.878 0.878 0.258 0.258 0.524 ...
  > 
  > proc.time()
     user  system elapsed 
     2.93    0.25    3.18 
Running the tests in 'tests/offset.R' failed.
Complete output:
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > set.seed(1)
  > DyestuffWithOffset <- within(Dyestuff, {
  +                            offset <- rnorm(length(Yield))
  +                            Yield <- Yield + offset
  + })
  > 
  > testFormula <- function(formula, data) {
  +     print(summary(fm <- lmer(formula, data, control=lmerControl(optimizer="bobyqa"))))
  +     print(summary(rm <- rlmer(formula, data, rho.e = cPsi, rho.b = cPsi, init = lmerNoFit)))
  +     ranef.fm <- ranef(fm, condVar=FALSE)
  +     stopifnot(all.equal(coef(fm), coef(rm), tolerance = 1e-3, check.attributes = FALSE),
  +               all.equal(fixef(fm), fixef(rm), tolerance = 1e-3, check.attributes = FALSE),
  +               all.equal(ranef.fm , ranef(rm), tolerance = 1e-2, check.attributes = FALSE),
  +               all.equal(fitted(fm) , fitted(rm), tolerance = 1e-3, check.attributes = FALSE),
  +               all.equal(predict(fm) , predict(rm), tolerance = 1e-3, check.attributes = FALSE))
  +     invisible(list(fm, rm))
  + }
  > 
  > testFormula(Yield ~ offset(offset) + (1 | Batch), DyestuffWithOffset)
  Linear mixed model fit by REML ['lmerMod']
  Formula: Yield ~ offset(offset) + (1 | Batch)
     Data: data
  Control: lmerControl(optimizer = "bobyqa")
  
  REML criterion at convergence: 319.7
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -1.4117 -0.7634  0.1418  0.7792  1.8296 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept) 1764     42.00   
   Residual             2451     49.51   
  Number of obs: 30, groups:  Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)  1527.50      19.38    78.8
  Robust linear mixed model fit by DAStau 
  Formula: formula 
     Data: data 
  
  Scaled residuals: 
      Min      1Q  Median      3Q     Max 
  -1.4249 -0.7476  0.1632  0.7990  1.8314 
  
  Random effects:
   Groups   Name        Variance Std.Dev.
   Batch    (Intercept) 1764     42.00   
   Residual             2475     49.75   
  Number of obs: 30, groups: Batch, 6
  
  Fixed effects:
              Estimate Std. Error t value
  (Intercept)   1527.6       19.4   78.73
  
  Robustness weights for the residuals: 
   All 30 weights are ~= 1.
  
  Robustness weights for the random effects: 
  [1] 1 1 1 1 1 1
  
  Rho functions used for fitting:
    Residuals:
      eff: classic 
      sig: classic 
    Random Effects, variance component 1 (Batch):
      eff: classic 
      vcp: classic 
  > 
  > 
  > proc.time()
     user  system elapsed 
     3.12    0.26    3.39 
Running the tests in 'tests/simulationStudies.R' failed.
Complete output:
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > ## verify all scripts listed in argument of viewCopyOfSimulationStudy actually
  > ## exist
  > sourceDirectory <-
  +     system.file("simulationStudy", package = "robustlmm")
  > allScripts <- list.files(sourceDirectory, pattern = ".R$")
  > actualScripts <- eval(formals(viewCopyOfSimulationStudy)$study)
  > stopifnot(all(actualScripts %in% allScripts))
  > 
  > proc.time()
     user  system elapsed 
     2.51    0.25    2.76 
Running the tests in 'tests/weights.R' failed.
Complete output:
  > require(robustlmm)
  Loading required package: robustlmm
  Loading required package: lme4
  Loading required package: Matrix
  > 
  > checkEquality <- function(cW, rW, tolerance = 1e-8) {
  +     stopifnot(
  +         all.equal(
  +             coef(cW),
  +             coef(rW),
  +             tolerance = tolerance,
  +             check.attributes = FALSE
  +         ),
  +         all.equal(
  +             fixef(cW),
  +             fixef(rW),
  +             tolerance = tolerance,
  +             check.attributes = FALSE
  +         ),
  +         all.equal(
  +             ranef(cW) ,
  +             ranef(rW),
  +             tolerance = 100 * tolerance,
  +             check.attributes = FALSE
  +         ),
  +         all.equal(
  +             fitted(cW) ,
  +             fitted(rW),
  +             tolerance = tolerance,
  +             check.attributes = FALSE
  +         ),
  +         all.equal(
  +             predict(cW) ,
  +             predict(rW),
  +             tolerance = tolerance,
  +             check.attributes = FALSE
  +         ),
  +         all.equal(
  +             coef(summary(cW)) ,
  +             coef(summary(rW)),
  +             tolerance = 100 * tolerance,
  +             check.attributes = FALSE
  +         )
  +     )
  + }
  > 
  > testBattery <- function(formula, data, tolerance) {
  +     nobs <- nrow(data)
  + 
  +     test <- function(weights) {
  +         cW <- lmer(formula, data, weights = weights)
  +         rW <-
  +             rlmer(
  +                 formula,
  +                 data,
  +                 weights = weights,
  +                 rho.e = cPsi,
  +                 rho.b = cPsi,
  +                 init = lmerNoFit
  +             )
  +         checkEquality(cW, rW, tolerance)
  +     }
  + 
  +     test(rep(2, nobs))
  +     test(rep(0.5, nobs))
  + 
  +     set.seed(133)
  +     test(runif(nobs))
  +     test(rexp(nobs))
  + }
  > 
  > testBattery(Yield ~ 1 | Batch, Dyestuff, 1e-8)
  Warning message:
  Detected very small weights (observation 19). You may encounter issues due to numerical instability. 
  > 
  > # Skip these to speed up tests
  > #testBattery(diameter ~ (1 | plate) + (1 | sample),
  > #            Penicillin, 1e-6)
  > #testBattery(Reaction ~ Days + (Days | Subject), sleepstudy, 1e-5)
  > 
  > # testBattery(y ~ service * dept + studage + lectage +
  > #                 (1 | s) + (1 | d), InstEval)
  > 
  > proc.time()
     user  system elapsed 
     4.96    0.29    5.21