Running ‘bugBO.R’ [2s/3s]
  Running ‘bugKEEPdprime.R’ [2s/3s]
  Running ‘testBugResiduals.R’ [56s/87s]
  Running ‘testDprimes.R’ [49s/75s]
  Running ‘testKEEPeffs.R’ [119s/170s]
  Running ‘testMAM.R’ [10m/14m]
Running the tests in ‘tests/testMAM.R’ failed.
Complete output:
  > require(SensMixed)
  Loading required package: SensMixed
  Loading required package: lmerTest
  Loading required package: Matrix
  Loading required package: lme4
  
  Attaching package: 'lmerTest'
  
  The following object is masked from 'package:lme4':
  
      lmer
  
  The following object is masked from 'package:stats':
  
      step
  
  
  Attaching package: 'SensMixed'
  
  The following object is masked from 'package:lmerTest':
  
      ham
  
  > checkMAM <- TRUE
  > 
  > if(checkMAM){
  +   
  +   #convert some variables to factors in TVbo
  +   TVbo <- convertToFactors(TVbo, c("Assessor", "Repeat", "Picture"))
  +   ##
  +   
  +   result <- sensmixed(names(TVbo)[5:(ncol(TVbo))],
  +                       prod_effects=c("TVset", "Picture"),
  +                       replication="Repeat", assessor="Assessor", data=TVbo, 
  +                       control = list(calc_post_hoc = TRUE), MAM = FALSE)
  +   
  +   result
  +   result$fixed
  +   
  +   result_MAM <- sensmixed(names(TVbo)[5:(ncol(TVbo))],
  +                           prod_effects=c("TVset", "Picture"),
  +                           replication="Repeat", assessor="Assessor", 
  +                           data = TVbo,
  +                           MAM = TRUE)
  +   
  +   result_MAM
  +   
  +   result_MAM_mult <- sensmixed(names(TVbo)[5:(ncol(TVbo))],
  +                                prod_effects=c("TVset", "Picture"),
  +                                replication="Repeat",assessor="Assessor", 
  +                                data=TVbo,
  +                                MAM = TRUE, control = list(MAM_mult_scaling = TRUE))
  +   
  +   result_MAM_mult
  +   
  +   atts <- names(TVbo)[5:10]
  +   res_MAM <- sensmixed(atts, prod_effects = c("TVset"), 
  +                        assessor="Assessor", data=TVbo, 
  +                        control=list(MAM_balanced=TRUE))
  +   
  +   ## selecting only 3 attributes
  +   atts <- names(TVbo)[5:10]
  +   res <- sensmixed(atts, prod_effects=c("TVset"), assessor="Assessor", 
  +                    data=TVbo, MAM=TRUE, control = list(reduce.random=FALSE, 
  +                    calc_post_hoc = TRUE))
  +   
  +   res_MAM <- sensmixed(atts, prod_effects=c("TVset"), assessor="Assessor", 
  +                        data=TVbo, control = list(MAM_balanced=TRUE))
  +   
  +   #####################################################
  +   ## bug for Noise attribute - different with MAManalysis
  +   TVbo$x <- rep(NA, nrow(TVbo))
  +   x.prd <- scale(predict(lm(Noise ~ TVset, data=TVbo)), scale=FALSE)
  +   notNA <- rownames(x.prd)
  +   TVbo[notNA, "x"] <- x.prd
  +   
  +   m.noisemam <- lmer(Noise ~ TVset + x:Assessor +
  +                             (1|Assessor) + (1|TVset:Assessor), data=TVbo )
  +   all.equal(anova(m.noisemam, ddf="lme4")[,"F value"], 
  +             anova(m.noisemam, type = 1)[, "F.value"])
  +   #######################################################
  +   
  +   TOL <- 1e-2
  +   for(i in 1:length(atts)){
  +     ## ERROR: different results for the Noise attribute
  +     ## because of Assessor:TVset std dev = 0
  +     if(i==3)
  +       tools::assertError(stopifnot(all.equal(res_MAM[[3]][, , i][2:3,"F"], 
  +                                              c(res$fixed$Fval[, i],
  +                                                res$scaling$FScaling[, i]), 
  +                                              tol=TOL, check.attributes = FALSE)))
  +     else
  +       stopifnot(all.equal(res_MAM[[3]][, , i][2:3,"F"], c(res$fixed$Fval[, i],
  +                                                           res$scaling$FScaling[, i]), 
  +                           tol=TOL, check.attributes = FALSE))
  +   }
  +   
  +   
  +   TOL <- 1e-2
  +   ## diff lsmeans agree
  +   for(i in 1:length(atts)){
  +     stopifnot(all.equal(res_MAM[[4]][, , i][1, 1], res$post_hoc[[i]][1, 1], tol=TOL, 
  +                         check.attributes = FALSE))
  +     stopifnot(all.equal(res_MAM[[4]][, , i][1, 2], res$post_hoc[[i]][2, 1], tol=TOL, 
  +                         check.attributes = FALSE))
  +     stopifnot(all.equal(res_MAM[[4]][, , i][3, 2], res$post_hoc[[i]][3, 1], tol=TOL, 
  +                         check.attributes = FALSE))
  +   }
  +   
  +   ## selecting another attributes to compare
  +   atts <- names(TVbo)[10:12]
  +   res <- sensmixed(atts, prod_effects=c("TVset"), assessor="Assessor", 
  +                    data=TVbo, MAM=TRUE, control = list(reduce.random=FALSE, 
  +                    calc_post_hoc = TRUE))
  +   
  +   res_MAM <- sensmixed(atts, prod_effects=c("TVset"), assessor="Assessor", 
  +                        data=TVbo, control = list(MAM_balanced=TRUE))
  +   TOL <- 1e-1
  +   for(i in 1:length(atts)){
  +     print(i)
  +     stopifnot(all.equal(res_MAM[[3]][, , i][2:3,"F"], c(res$fixed$Fval[, i],
  +                                                         res$scaling$FScaling[, i]), 
  +                         tol=TOL, check.attributes = FALSE))
  +   }
  +   
  +   TOL <- 1e-1
  +   for(i in 1:length(atts)){
  +     stopifnot(all.equal(res_MAM[[4]][, , i][1, 1], res$post_hoc[[i]][1, 1], 
  +                         tol=TOL, 
  +                         check.attributes = FALSE))
  +     stopifnot(all.equal(res_MAM[[4]][, , i][1, 2], res$post_hoc[[i]][2, 1], 
  +                         tol=TOL, 
  +                         check.attributes = FALSE))
  +     stopifnot(all.equal(res_MAM[[4]][, , i][3, 2], res$post_hoc[[i]][3, 1], 
  +                         tol=TOL, 
  +                         check.attributes = FALSE))
  +   }
  +   
  +   ## check post-hoc for the multiway case
  + #   atts <- names(TVbo)[5:19]
  + #   res <- sensmixed(atts, Prod_effects=c("TVset", "Picture"), individual="Assessor",                  
  + #                    data=TVbo, MAM=TRUE, calc_post_hoc = TRUE)
  +   
  + }
  
  
    |                                                                            
    |                                                                      |   0%
  
    |                                                                            
    |=====                                                                 |   7%
  
    |                                                                            
    |=========                                                             |  13%
  
    |                                                                            
    |==============                                                        |  20%
  
    |                                                                            
    |===================                                                   |  27%
  
    |                                                                            
    |=======================                                               |  33%
  
    |                                                                            
    |============================                                          |  40%
  
    |                                                                            
    |=================================                                     |  47%
  
    |                                                                            
    |=====================================                                 |  53%
  
    |                                                                            
    |==========================================                            |  60%
  
    |                                                                            
    |===============================================                       |  67%
  
    |                                                                            
    |===================================================                   |  73%
  
    |                                                                            
    |========================================================              |  80%
  
    |                                                                            
    |=============================================================         |  87%
  
    |                                                                            
    |=================================================================     |  93%
  
    |                                                                            
    |======================================================================| 100%
  
  
  
    |                                                                            
    |                                                                      |   0%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=====                                                                 |   7%
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=========                                                             |  13%
  
  Warning: 
   Random term (1 | TVset:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |==============                                                        |  20%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |===================                                                   |  27%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=======================                                               |  33%
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |============================                                          |  40%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=================================                                     |  47%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=====================================                                 |  53%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Assessor) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |==========================================                            |  60%
  
  Warning: 
   Random term (1 | TVset:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Assessor) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |===============================================                       |  67%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |===================================================                   |  73%
  
  Warning: 
   Random term (1 | TVset:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |========================================================              |  80%
  
  Warning: 
   Random term (1 | Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Picture:Assessor:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | TVset:Picture:Repeat) was eliminated because of standard deviation being equal to 0 
  
  Warning: 
   Random term (1 | Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  
    |                                                                            
    |=============================================================         |  87%
  
  Warning: 
   Random term (1 | TVset:Repeat) was eliminated because of standard deviation being equal to 0 
  
  fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
  Killed