Running ‘testthat.R’ [142s/164s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(FindIt)
  Loading required package: arm
  Loading required package: MASS
  Loading required package: Matrix
  Loading required package: lme4
  
  arm (Version 1.9-3, built: 2016-11-21)
  
  Working directory is /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/FindIt.Rcheck/tests
  
  > 
  > test_check("FindIt")
  
  Check: the number of levels for factors and whether they are ordered.
                 levels ordered
  newRecordF          7    TRUE
  promise             3    TRUE
  coeth_voting        2   FALSE
  relevantdegree      2   FALSE
   
  Model:
   won ~ newRecordF + promise + coeth_voting + relevantdegree
  <environment: 0x5635a879a658>
  ******
  Range:
  ******
                 range
  newRecordF     0.164
  promise        0.035
  coeth_voting   0.065
  relevantdegree 0.003
  *******************************
  Average Marginal Effects (AME):
  *******************************
           Factor    Levels base     AME Std.Err  2.5%CI 97.5%CI
       newRecordF     YesLC       0.1641  0.0320  0.1014  0.2268
       newRecordF    YesDis       0.1154  0.0304  0.0559  0.1749
       newRecordF     YesMP       0.0930  0.0300  0.0342  0.1519
       newRecordF      noLC       0.0292  0.0353 -0.0399  0.0983
       newRecordF     noDis       0.1026  0.0405  0.0232  0.1819
       newRecordF      noMP       0.0730  0.0388 -0.0030  0.1489
       newRecordF    noBusi  ***  0.0000  0.0000  0.0000  0.0000
          promise      jobs      -0.0322  0.0246 -0.0804  0.0161
          promise    clinic      -0.0352  0.0231 -0.0805  0.0101
          promise education  ***  0.0000  0.0000  0.0000  0.0000
     coeth_voting         0      -0.0650  0.0191 -0.1024 -0.0276
     coeth_voting         1  ***  0.0000  0.0000  0.0000  0.0000
   relevantdegree         0       0.0025  0.0210 -0.0387  0.0437
   relevantdegree         1  ***  0.0000  0.0000  0.0000  0.0000
  
  
  Check: the number of levels for factors and whether they are ordered.
                 levels ordered
  newRecordF          7    TRUE
  promise             3    TRUE
  coeth_voting        2   FALSE
  relevantdegree      2   FALSE
  [1] "50% done."
  [1] "100% done."
  [1] -5 -4
  [1] -15  10
  [1] -15  10
  [1] -4 -4
  [1] -10   0
  [1] -9  1
  [1] -4 -4
  [1] -9  1
  [1] -9  1
  [1] -4 -4
  [1] -6.5 -1.5
  [1] -6.5 -1.5
  [1] -4 -4
  [1] -5.5 -2.5
  [1] -5.5 -2.5
  [1] -4 -4
  [1] -4.5 -3.5
  [1] -4.5 -3.5
  [1] -4 -4
  [1] -4.25 -3.75
  [1] -4.25 -3.75
  [1] -3.875 -4.000
  [1] -4.15 -3.85
  [1] -4.15 -3.85
  [1] -3.875 -4.000
  [1] -4.025 -3.725
  [1] -4.15 -3.85
  [1] -3.875 -4.000
  [1] -3.975 -3.775
  [1] -4.1 -3.9
  [1] -3.875 -4.000
  [1] -3.975 -3.775
  [1] -4.1 -3.9
  [1] -3.88 -4.00
  [1] -3.925 -3.825
  [1] -4.05 -3.95
  [1] -3.88 -4.00
  [1] -3.93 -3.83
  [1] -4.05 -3.95
  [1] -3.88 -4.00
  [1] -3.905 -3.855
  [1] -4.025 -3.975
  [1] -3.88 -4.00
  [1] -3.89 -3.87
  [1] -4.01 -3.99
  [1] -3.88 -4.00
  [1] -3.8825 -3.8775
  [1] -4.0025 -3.9975
  
  Call:
   Treatment Model: outcome ~ treat
  <environment: 0x5635aaea3878>
   Main Model : ~age + educ + black + hisp + white + marr + nodegr + log.re75 + 
      u75
  <environment: 0x5635aaea3878>
   Interaction Covariates: ~age + educ + black + hisp + white + marr + nodegr + log.re75 + 
      u75
  <environment: 0x5635aaea3878>
   Treatment type: [1] "single"
   Outcome type: [1] "binary"
  
  ATE:
  [1] 0.07903784
  
  Coefficients:
              Intercept                black1                white1 
                  0.164                 -0.11               0.00577 
                    age              log.re75             hisp1:age 
                -0.0111               -0.0369               -0.0127 
         white1:nodegr1             marr1:age          nodegr1:u751 
                -0.0557               0.00294              -0.00997 
            nodegr1:age          nodegr1:educ              u751:age 
               -0.00505              -0.00667               0.00351 
                  age.2            log.re75.2                 treat 
                0.00058               -0.0102                0.0692 
            treat:marr1 treat:black1:log.re75  treat:hisp1:log.re75 
                 0.0495               0.00629               -0.0418 
   treat:white1:nodegr1      treat:marr1:educ    treat:nodegr1:u751 
                  0.181                0.0108               -0.0848 
         treat:u751:age       treat:u751:educ           treat:age.2 
                  0.018                0.0403             -0.000232 
           treat:educ.2 
                0.00828 
  
  ---------
  Model Fit Statistics:
  GCV:
    Null:  0.986  Model:  625.985 
  Percent Misclassified:
     Null:  0.43   Model:  0.32 
     Percent Improvement, vs. NULL:  26.75 % 
  Percent Outside Margin:
    1.108 %, n = 8 
  
  Check: the number of levels for factors and whether they are ordered.
                 levels ordered
  newRecordF          7    TRUE
  promise             3    TRUE
  coeth_voting        2   FALSE
  relevantdegree      2   FALSE
  
   ***** Screening ***** 
  
  Selected Two-way Interactions.
           Fac.1          Fac.2
  1   newRecordF   coeth_voting
  2      promise   coeth_voting
  3 coeth_voting relevantdegree
  
   ***** Collapsing ***** 
  
   *** caught bus error ***
  address 0x7fcdefe1e520, cause 'non-existent physical address'
  
  Traceback:
   1: .Call(C_R_igraph_graph_adjacency, adjmatrix, as.numeric(mode))
   2: graph.adjacency.dense(adjmatrix, mode = mode, weighted = weighted,     diag = diag)
   3: graph_from_adjacency_matrix(adj, mode = "undirected")
   4: Collapsing(fit)
   5: summary.CausalANOVA(fit.r2)
   6: summary(fit.r2)
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  13: doTryCatch(return(expr), name, parentenv, handler)
  14: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  15: tryCatchList(expr, classes, parentenv, handlers)
  16: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  17: test_code(desc, code, env = parent.frame())
  18: test_that("tests FindIt on test.CausalANOVA", {    set.seed(12345)    data(Carlson)    Carlson$newRecordF <- factor(Carlson$newRecordF, ordered = TRUE,         levels = c("YesLC", "YesDis", "YesMP", "noLC", "noDis",             "noMP", "noBusi"))    Carlson$promise <- factor(Carlson$promise, ordered = TRUE,         levels = c("jobs", "clinic", "education"))    Carlson$coeth_voting <- factor(Carlson$coeth_voting, ordered = FALSE,         levels = c("0", "1"))    Carlson$relevantdegree <- factor(Carlson$relevantdegree,         ordered = FALSE, levels = c("0", "1"))    train.ind <- sample(unique(Carlson$respcodeS), 272, replace = FALSE)    test.ind <- setdiff(unique(Carlson$respcodeS), train.ind)    Carlson.train <- Carlson[is.element(Carlson$respcodeS, train.ind),         ]    Carlson.test <- Carlson[is.element(Carlson$respcodeS, test.ind),         ]    fit.r2 <- CausalANOVA(formula = won ~ newRecordF + promise +         coeth_voting + relevantdegree, data = Carlson.train,         pair.id = Carlson.train$contestresp, diff = TRUE, screen = TRUE,         collapse = TRUE, cluster = Carlson.train$respcodeS, nway = 2)    x <- summary(fit.r2)    expect_that(length(x), is_equivalent_to(5))    expect_true("range.name" %in% names(x))    expect_equal(x$range["coeth_voting", "range"], 0.065, tolerance = 0.001)    expect_equal(x$AME["newRecordF3", "AME"], 0.1351, tolerance = 0.001)    expect_equal(x$AMIE2[10, "AMIE"], 0.0624, tolerance = 0.001)    expect_true(is.null(x$AMIE3))    fit.r2.new <- test.CausalANOVA(fit.r2, newdata = Carlson.test,         diff = TRUE, pair.id = Carlson.test$contestresp, cluster = Carlson.test$respcodeS)    x <- summary(fit.r2.new)    expect_that(length(x), is_equivalent_to(5))    expect_true("range.name" %in% names(x))    expect_equal(x$range["coeth_voting", "range"], 0.024, tolerance = 0.001)    expect_equal(x$AME["newRecordF3", "AME"], -0.0247, tolerance = 0.001)    expect_equal(x$AMIE2[10, "AMIE"], -0.0651, tolerance = 0.001)    expect_true(is.null(x$AMIE3))    plot(fit.r2.new)    plot(fit.r2.new, type = "ConditionalEffect", fac.name = c("newRecordF",         "coeth_voting"))})
  19: eval(code, test_env)
  20: eval(code, test_env)
  21: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  22: doTryCatch(return(expr), name, parentenv, handler)
  23: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  24: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  27: tryCatchList(expr, classes, parentenv, handlers)
  28: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  29: test_code(NULL, exprs, env)
  30: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  31: force(code)
  32: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  33: FUN(X[[i]], ...)
  34: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  35: force(code)
  36: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  37: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  38: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  39: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  40: test_check("FindIt")
  An irrecoverable exception occurred. R is aborting now ...
  Bus error