Running ‘testthat.R’ [21s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(pprof)
  > 
  > test_check("pprof")
  Input format: Y, Z, and ProvID.
  Input format: Y, Z, and ProvID.
  Input format: Y, Z, and ProvID.
  3 out of 100 remaining providers with no events.
  0 out of 100 remaining providers with all events.
  After screening, 38.77% of all records exhibit occurrences of events (Y = 1)
  Implementing SerBIN algorithm (Rcpp) for fixed provider effects model ...
  Iter 1: Minimum criterion across all checks is 5.022e-01;
  Iter 2: Minimum criterion across all checks is 1.422e-01;
  Iter 3: Minimum criterion across all checks is 3.528e-02;
  Iter 4: Minimum criterion across all checks is 5.671e-03;
  Iter 5: Minimum criterion across all checks is 1.214e-03;
  Iter 6: Minimum criterion across all checks is 2.151e-04;
  Iter 7: Minimum criterion across all checks is 6.647e-05;
  Iter 8: Minimum criterion across all checks is 7.565e-06;
  serBIN (Rcpp) algorithm converged after 8 iterations!
  Setting levels: control = 0, case = 1
  Setting direction: controls < cases
  Input format: Y, Z, and ProvID.
  Saving _problems/test-SM_output-99.R
  Saving _problems/test-SM_output-125.R
  Input format: Y, Z, and ProvID.
  Input format: Y, Z, and ProvID.
  Input format: Y, Z, and ProvID.
  3 out of 100 remaining providers with no events.
  0 out of 100 remaining providers with all events.
  After screening, 38.77% of all records exhibit occurrences of events (Y = 1)
  Implementing SerBIN algorithm (Rcpp) for fixed provider effects model ...
  Iter 1: Minimum criterion across all checks is 5.022e-01;
  Iter 2: Minimum criterion across all checks is 1.422e-01;
  Iter 3: Minimum criterion across all checks is 3.528e-02;
  Iter 4: Minimum criterion across all checks is 5.671e-03;
  Iter 5: Minimum criterion across all checks is 1.214e-03;
  Iter 6: Minimum criterion across all checks is 2.151e-04;
  Iter 7: Minimum criterion across all checks is 6.647e-05;
  Iter 8: Minimum criterion across all checks is 7.565e-06;
  serBIN (Rcpp) algorithm converged after 8 iterations!
  Setting levels: control = 0, case = 1
  Setting direction: controls < cases
  Input format: Y, Z, and ProvID.
  Saving _problems/test-confint-132.R
  Saving _problems/test-confint-165.R
  Input format: Y, Z, and ProvID.
  Input format: data, Y.char, Z.char, and ProvID.char.
  Input format: formula and data.
  Input format: Y, Z, and ProvID.
  Input format: data, Y.char, Z.char, and ProvID.char.
  Input format: formula and data.
  Saving _problems/test-logis_cre-13.R
  Input format: Y, Z, and ProvID.
  3 out of 100 remaining providers with no events.
  0 out of 100 remaining providers with all events.
  After screening, 38.77% of all records exhibit occurrences of events (Y = 1)
  Implementing SerBIN algorithm (Rcpp) for fixed provider effects model ...
  Iter 1: Minimum criterion across all checks is 5.022e-01;
  Iter 2: Minimum criterion across all checks is 1.422e-01;
  Iter 3: Minimum criterion across all checks is 3.528e-02;
  Iter 4: Minimum criterion across all checks is 5.671e-03;
  Iter 5: Minimum criterion across all checks is 1.214e-03;
  Iter 6: Minimum criterion across all checks is 2.151e-04;
  Iter 7: Minimum criterion across all checks is 6.647e-05;
  Iter 8: Minimum criterion across all checks is 7.565e-06;
  serBIN (Rcpp) algorithm converged after 8 iterations!
  Setting levels: control = 0, case = 1
  Setting direction: controls < cases
  Input format: data, Y.char, Z.char, and ProvID.char.
  3 out of 100 remaining providers with no events.
  0 out of 100 remaining providers with all events.
  After screening, 38.77% of all records exhibit occurrences of events (Y = 1)
  Implementing SerBIN algorithm (Rcpp) for fixed provider effects model ...
  Iter 1: Minimum criterion across all checks is 5.022e-01;
  Iter 2: Minimum criterion across all checks is 1.422e-01;
  Iter 3: Minimum criterion across all checks is 3.528e-02;
  Iter 4: Minimum criterion across all checks is 5.671e-03;
  Iter 5: Minimum criterion across all checks is 1.214e-03;
  Iter 6: Minimum criterion across all checks is 2.151e-04;
  Iter 7: Minimum criterion across all checks is 6.647e-05;
  Iter 8: Minimum criterion across all checks is 7.565e-06;
  serBIN (Rcpp) algorithm converged after 8 iterations!
  Setting levels: control = 0, case = 1
  Setting direction: controls < cases
  Input format: formula and data.
  3 out of 100 remaining providers with no events.
  0 out of 100 remaining providers with all events.
  After screening, 38.77% of all records exhibit occurrences of events (Y = 1)
  Implementing SerBIN algorithm (Rcpp) for fixed provider effects model ...
  Iter 1: Minimum criterion across all checks is 5.022e-01;
  Iter 2: Minimum criterion across all checks is 1.422e-01;
  Iter 3: Minimum criterion across all checks is 3.528e-02;
  Iter 4: Minimum criterion across all checks is 5.671e-03;
  Iter 5: Minimum criterion across all checks is 1.214e-03;
  Iter 6: Minimum criterion across all checks is 2.151e-04;
  Iter 7: Minimum criterion across all checks is 6.647e-05;
  Iter 8: Minimum criterion across all checks is 7.565e-06;
  serBIN (Rcpp) algorithm converged after 8 iterations!
  Setting levels: control = 0, case = 1
  Setting direction: controls < cases
  Input format: Y, Z, and ProvID.
  
   *** caught segfault ***
  address 0x5640417be830, cause 'memory not mapped'
  
  Traceback:
   1: pwrssUpdate(pp, resp, tol = tolPwrss, GQmat = GQmat, compDev = compDev,     grpFac = fac, maxit = maxit, verbose = verbose)
   2: fn(nM$xeval())
   3: stopifnot(length(value <- as.numeric(value)) == 1L)
   4: nM$newf(fn(nM$xeval()))
   5: (function (fn, par, lower = rep.int(-Inf, n), upper = rep.int(Inf,     n), control = list()) {    n <- length(par)    if (is.null(xst <- control[["xst"]]))         xst <- rep.int(0.02, n)    if (is.null(xt <- control[["xt"]]))         xt <- xst * 5e-04    control[["xst"]] <- control[["xt"]] <- NULL    if (is.null(verbose <- control[["verbose"]]))         verbose <- 0    control[["verbose"]] <- NULL    if (is.null(control[["iprint"]])) {        control[["iprint"]] <- switch(as.character(min(as.numeric(verbose),             3L)), `0` = 0, `1` = 20, `2` = 10, `3` = 1)    }    stopifnot(is.function(fn), length(formals(fn)) == 1L, (n <- length(par <- as.numeric(par))) ==         length(lower <- as.numeric(lower)), length(upper <- as.numeric(upper)) ==         n, length(xst <- as.numeric(xst)) == n, all(xst != 0),         length(xt <- as.numeric(xt)) == n)    nM <- NelderMead$new(lower = lower, upper = upper, x0 = par,         xst = xst, xt = xt)    cc <- do.call(function(iprint = 0L, maxfun = 10000L, FtolAbs = 1e-05,         FtolRel = 1e-15, XtolRel = 1e-07, MinfMax = -.Machine$double.xmax,         warnOnly = FALSE, ...) {        if (...length() > 0)             warning("unused control arguments ignored")        list(iprint = iprint, maxfun = maxfun, FtolAbs = FtolAbs,             FtolRel = FtolRel, XtolRel = XtolRel, MinfMax = MinfMax,             warnOnly = warnOnly)    }, control)    nM$setFtolAbs(cc$FtolAbs)    nM$setFtolRel(cc$FtolRel)    nM$setIprint(cc$iprint)    nM$setMaxeval(cc$maxfun)    nM$setMinfMax(cc$MinfMax)    it <- 0    repeat {        it <- it + 1        nMres <- nM$newf(fn(nM$xeval()))        if (nMres != 0L)             break    }    cmsg <- "reached max evaluations"    if (nMres == -4) {        cmsg <- warning(sprintf("failure to converge in %d evaluations",             cc$maxfun))        nMres <- 4    }    msgvec <- c("nm_forced", "cannot generate a feasible simplex",         "initial x is not feasible", "active", "objective function went below allowed minimum",         "objective function values converged to within tolerance",         "parameter values converged to within tolerance", cmsg)    if (nMres < 0) {        (if (cc$warnOnly)             warning        else stop)(msgvec[nMres + 4])    }    list(fval = nM$value(), par = nM$xpos(), convergence = pmin(0,         nMres), NM.result = nMres, message = msgvec[nMres + 4],         control = c(cc, xst = xst, xt = xt), feval = it)})(fn = function (pars) {    resp$setOffset(baseOffset)    resp$updateMu(lp0)    pp$setTheta(mkTheta(as.double(pars[dpars])))    spars <- as.double(pars[-dpars])    offset <- if (length(spars) == 0)         baseOffset    else baseOffset + pp$X %*% spars    resp$setOffset(offset)    p <- pwrssUpdate(pp, resp, tol = tolPwrss, GQmat = GQmat,         compDev = compDev, grpFac = fac, maxit = maxit, verbose = verbose)    resp$updateWts()    p}, par = c(0.468607523292137, -0.972251105312955, 1.07368783024528, 1.00545583069717, 0.982297419628586, 1.02159424566637, 1.03318616583394), lower = c(0, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf), upper = c(Inf, Inf, Inf, Inf, Inf, Inf, Inf), control = list(xst = c(0.02, 0.0120964948228697, 0.00806677239991467, 0.00801317258186648, 0.00783753005989266, 0.00800874015940586, 0.00811250580290572), xt = c(1e-05, 6.04824741143487e-06, 4.03338619995733e-06, 4.00658629093324e-06, 3.91876502994633e-06, 4.00437007970293e-06, 4.05625290145286e-06), verbose = 0L))
   6: do.call(optfun, arglist)
   7: withCallingHandlers(do.call(optfun, arglist), warning = function(w) {    curWarnings <<- append(curWarnings, list(w$message))})
   8: optwrap(optimizer, devfun, start, lower = lower, upper = upper,     control = control, adj = nAGQ > 0L, verbose = verbose, ...)
   9: optimizeGlmer(devfun, optimizer = control$optimizer[[2]], restart_edge = control$restart_edge,     boundary.tol = control$boundary.tol, control = control$optCtrl,     start = start, nAGQ = nAGQ, verbose = verbose, calc.derivs = calc.derivs,     use.last.params = control$use.last.params)
  10: glmer(formula, data, family = binomial(link = "logit"), ...)
  11: logis_re(Y = Y, Z = Z, ProvID = ProvID)
  12: eval(code, test_env)
  13: eval(code, test_env)
  14: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  15: doTryCatch(return(expr), name, parentenv, handler)
  16: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  17: tryCatchList(expr, classes, parentenv, handlers)
  18: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  19: doWithOneRestart(return(expr), restart)
  20: withOneRestart(expr, restarts[[1L]])
  21: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  22: test_code(code, parent.frame())
  23: test_that("logis_re function behaves correctly", {    data(ExampleDataBinary)    Y <- ExampleDataBinary$Y    Z <- ExampleDataBinary$Z    ProvID <- ExampleDataBinary$ProvID    data <- data.frame(Y, ProvID, Z)    Z.char <- colnames(Z)    Y.char <- "Y"    ProvID.char <- "ProvID"    formula <- as.formula(paste("Y ~", paste(Z.char, collapse = " + "),         "+ (1 | ProvID)"))    fit_re1 <- logis_re(Y = Y, Z = Z, ProvID = ProvID)    fit_re2 <- logis_re(data = data, Y.char = Y.char, Z.char = Z.char,         ProvID.char = ProvID.char)    fit_re3 <- logis_re(formula, data)    expect_true(all(class(fit_re1) == "logis_re", class(fit_re2) ==         "logis_re", class(fit_re3) == "logis_re"), info = "All models should be of class 'logis_re'.")    expect_true(all(all.equal(fit_re1$fitted, fit_re2$fitted),         all.equal(fit_re1$fitted, fit_re3$fitted)), info = "All models have the same result.")})
  24: eval(code, test_env)
  25: eval(code, test_env)
  26: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  27: doTryCatch(return(expr), name, parentenv, handler)
  28: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  29: tryCatchList(expr, classes, parentenv, handlers)
  30: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  31: doWithOneRestart(return(expr), restart)
  32: withOneRestart(expr, restarts[[1L]])
  33: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  34: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  35: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  36: FUN(X[[i]], ...)
  37: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  38: doTryCatch(return(expr), name, parentenv, handler)
  39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  40: tryCatchList(expr, classes, parentenv, handlers)
  41: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  42: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  43: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  44: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel, shuffle = shuffle)
  45: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  46: test_check("pprof")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault