Running 'testthat.R' [18s/21s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # Had the same issue as in this thread: https://github.com/hadley/testthat/issues/86
  > Sys.setenv("R_TESTS" = "")
  > 
  > options(deparse.max.lines = 5)
  > suppressWarnings(RNGversion("3.5.0"))
  > 
  > testthat::test_check("dynamichazard", reporter = "summary")
  Loading required package: dynamichazard
  Loading required package: survival
  Tracing function "expect_known_value" in package "testthat"
  Tracing function "expect_known_output" in package "testthat"
  Loading required package: DBI
  Running tests for GMA: ..................
  Testing LAPACK wrapper functions: ....1......................................
  Running test_PF: ........................................................................................................................................................................................................SS...SSSSSSSS..S2SS..SSSSSSSSS
  Testing SMA: ...........3.4567........89
  Testing UKF: .........................
  Testing bigglm_wrapper: ..........
  Testing boot: ...Sab..............................................................................................................................................................................................................................................................................................................................................................................................................
  
  == Skipped =====================================================================
  1. PF_smooth gives same results (@test_PF.R#71) - On CRAN
  
  2. Import and export PF cloud from Rcpp gives the same (@test_PF.R#249) - On CRAN
  
  3. PF_EM gives previous results on head neck data set (@test_PF.R#342) - On CRAN
  
  4. PF_EM gives previous results on head neck data set with fixed effects and the logit model (@test_PF.R#409) - On CRAN
  
  5. compute_PF_summary_stats gives previous results (@test_PF.R#434) - On CRAN
  
  6. 'get_cloud_means' and 'get_cloud_quantiles' gives previous results (@test_PF.R#508) - On CRAN
  
  7. 'get_ancestors' yields the correct result (@test_PF.R#558) - On CRAN
  
  8. <U+00B4>est_params_dens<U+00B4> gives the same as a R version (@test_PF.R#580) - On CRAN
  
  9. fixed effect estimation gives the same as an R implementation (@test_PF.R#628) - On CRAN
  
  10. A few iterations with `type = "VAR"' yields the same as before (@test_PF.R#709) - On CRAN
  
  11. PF_EM gives the same with restricted and unrestricted model when we estimate all the parameters (@test_PF.R#778) - On CRAN
  
  12. Using `n_smooth_final` works as expected and yields previous results (@test_PF.R#883) - On CRAN
  
  13. sampling with a t-distribution gives previous results (@test_PF.R#949) - On CRAN
  
  14. 'PF_forward_filter' gives the same as 'PF_EM' when it should (@test_PF.R#987) - On CRAN
  
  15. 'state_fw' gives correct results (@test_PF.R#1116) - !dir.exists("pf-internals")
  
  16. 'state_bw' gives correct results (@test_PF.R#1152) - !dir.exists("pf-internals")
  
  17. 'artificial_prior' gives correct results (@test_PF.R#1187) - !dir.exists("pf-internals")
  
  18. 'observational_cdist' gives correct results (@test_PF.R#1221) - !dir.exists("pf-internals")
  
  19. combining forward and backwards works (@test_PF.R#1266) - !dir.exists("pf-internals")
  
  20. combining prior and backwards works (@test_PF.R#1313) - !dir.exists("pf-internals")
  
  21. mode approximations give expected result (@test_PF.R#1351) - !dir.exists("pf-internals")
  
  22. 'PF_get_score_n_hess' gives the same as an R implementation (@test_PF.R#1493) - On CRAN
  
  23. boot yields previously computed values with pbc (@test_boot_est.R#19) - On CRAN
  
  == Failed ======================================================================
  -- 1. Error: Square triangular inversion works followed by rank one update (@tes
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: square_tri_inv_test(d1) at testthat/test_LAPACK_BLAS.R:98
  
  -- 2. Error: type = 'VAR' works with non-zero mean with a single term and gives 
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: suppressWarnings(PF_EM(Surv(start, stop, event) ~ ddFixed(group) + ddFixed_intercept(TRUE), 
         head_neck_cancer, Q_0 = 1, Q = 0.2, Fmat = diag(0.01, 1), by = 1, type = "VAR", 
         model = "logit", max_T = 30, control = PF_control(N_fw_n_bw = 50, N_smooth = 100, 
             N_first = 500, eps = 0.001, method = "AUX_normal_approx_w_cloud_mean", n_max = 2, 
             smoother = "Fearnhead_O_N", Q_tilde = diag(0.3^2, 1), n_threads = 1))) at testthat/test_PF.R:851
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: PF_EM(Surv(start, stop, event) ~ ddFixed(group) + ddFixed_intercept(TRUE), head_neck_cancer, 
         Q_0 = 1, Q = 0.2, Fmat = diag(0.01, 1), by = 1, type = "VAR", model = "logit", 
         max_T = 30, control = PF_control(N_fw_n_bw = 50, N_smooth = 100, N_first = 500, 
             eps = 0.001, method = "AUX_normal_approx_w_cloud_mean", n_max = 2, smoother = "Fearnhead_O_N", 
             Q_tilde = diag(0.3^2, 1), n_threads = 1))
  4: .PF_EM(trace = trace, seed = seed, fixed_params = fixed_params, type = type, n_fixed_terms_in_state_vec = static_args$n_fixed_terms_in_state_vec, 
         X = static_args$X, fixed_terms = static_args$fixed_terms, tstart = static_args$tstart, 
         tstop = static_args$tstop, risk_obj = static_args$risk_obj, debug = static_args$debug, 
         model = static_args$model, Q = model_args$Q, Q_0 = model_args$Q_0, F. = model_args$F., 
         R = model_args$R, a_0 = model_args$a_0, G = model_args$G, J = model_args$J, K = model_args$K, 
  5: eval(fit_call, envir = parent.frame())
  6: eval(fit_call, envir = parent.frame())
  7: PF_smooth(n_fixed_terms_in_state_vec = static_args$n_fixed_terms_in_state_vec, X = static_args$X, 
         fixed_terms = static_args$fixed_terms, tstart = static_args$tstart, tstop = static_args$tstop, 
         Q_0 = structure(0.2000200020002, .Dim = c(1L, 1L)), Q = structure(0.2, .Dim = c(1L, 
         1L)), a_0 = 0, R = model_args$R, risk_obj = static_args$risk_obj, n_max = control$n_max, 
         n_threads = control$n_threads, N_fw_n_bw = control$N_fw_n_bw, N_smooth = control$N_smooth, 
  
  -- 3. Error: Changing between woodbury and cholesky makes a slight difference wi
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: eval(cl) at testthat/test_SMA.R:77
  2: eval(cl)
  3: ddhazard(Surv(tstart, tstop, death == 2) ~ age + edema + log(albumin) + log(protime) + 
         log(bili), pbc2, id = pbc2$id, by = 100, max_T = 3600, control = ctrl, Q_0 = diag(rep(1e+05, 
         6)), Q = diag(rep(0.01, 6)))
  4: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 4. Error: Logit model for posterior_approx gives previous found values with w
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: eval(cl) at testthat/test_SMA.R:107
  2: eval(cl)
  3: ddhazard(formula = survival::Surv(start, stop, event) ~ group, data = head_neck_cancer, 
         by = 1, control = ddhazard_control(est_Q_0 = F, method = "SMA", save_data = F, 
             save_risk_set = F, eps = 0.01), Q_0 = diag(1e+05, 2), Q = diag(0.01, 2), 
         max_T = 45, order = 1)
  4: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 5. Error: Chaning the learning changes the result for the posterior approx me
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: eval(cl) at testthat/test_SMA.R:131
  2: eval(cl)
  3: ddhazard(formula = survival::Surv(start, stop, event) ~ group, data = head_neck_cancer, 
         by = 1, control = ctrl, Q_0 = diag(1e+05, 2), Q = diag(0.01, 2), max_T = 45, 
         order = 1)
  4: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 6. Error: Second order model gives previous found result for posterior approx
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: ddhazard(formula = survival::Surv(start, stop, event) ~ group, data = head_neck_cancer, 
         by = 1, control = ddhazard_control(method = "SMA"), Q_0 = diag(1, 4), Q = diag(0.01, 
             2), max_T = 30, order = 2) at testthat/test_SMA.R:151
  2: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  -- 7. Error: Posterior gives previous found results with large by length for pbc
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: ddhazard(Surv(tstart, tstop, death == 2) ~ age + edema + log(albumin) + log(protime) + 
         log(bili), pbc2, id = pbc2$id, by = 300, max_T = 3600, control = ddhazard_control(method = "SMA"), 
         Q_0 = diag(rep(1e+05, 6)), Q = diag(rep(0.001, 6))) at testthat/test_SMA.R:168
  2: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
  
  -- 8. Error: Exponential model for posterior_approx gives previous found values 
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: eval(cl) at testthat/test_SMA.R:225
  2: eval(cl)
  3: ddhazard(Surv(tstart, tstop, death == 2) ~ age + edema + log(albumin) + log(protime) + 
         log(bili), pbc2, id = pbc2$id, by = 100, max_T = 3600, model = "exp_clip_time_w_jump", 
         control = ddhazard_control(method = "SMA", eps = 0.01), Q_0 = diag(rep(1e+05, 
             6)), Q = diag(rep(0.001, 6)))
  4: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 9. Error: Exponential model yields the same results for all the method inputs
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: eval(cl) at testthat/test_SMA.R:240
  2: eval(cl)
  3: ddhazard(Surv(tstart, tstop, death == 2) ~ age + edema + log(albumin) + log(protime) + 
         log(bili), pbc2, id = pbc2$id, by = 100, max_T = 3600, model = "exp_clip_time_w_jump", 
         control = ddhazard_control(method = "SMA", eps = 0.01), Q_0 = diag(rep(1e+05, 
             6)), Q = diag(rep(0.001, 6)))
  4: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 10. Error: Boot works with posterior_approx and gives previous found results 
  BLAS/LAPACK routine 'DTRTI2' gave error code -1
  1: ddhazard(formula = survival::Surv(start, stop, event) ~ group, data = head_neck_cancer, 
         by = 1, control = ddhazard_control(method = "SMA", eps = 0.01), Q_0 = diag(1e+05, 
             2), Q = diag(0.01, 2), max_T = 45) at testthat/test_boot_est.R:80
  2: tryCatch({
         result <- ddhazard_no_validation(a_0 = a_0, Q_0 = Q_0, F. = F., verbose = verbose, 
             Q = Q, risk_set = risk_set, X_Y = X_Y, model = model, R = R, L = L, LR = control$LR * 
                 control$LR_decrease_fac^(k), n_fixed_terms_in_state_vec = ifelse(est_fixed_in_E, 
                 n_fixed, 0), weights = weights, control)
  3: tryCatchList(expr, classes, parentenv, handlers)
  4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5: value[[3L]](cond)
    ... and 1 more
  
  
  Maximum number of 10 failures reached, some test results may be missing.
  
  == DONE ========================================================================
  Error: Test failures
  Execution halted