Running ‘testthat.R’ [61s/72s]
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: ....123.......................................
  Running test_PF: ........................................................................................................................................................................................................SS...SSSSSSSS..S..SS..SSSSSSSSS
  Testing SMA: ...........W.4.....WWWWWW56........W7WW.W.W.
  Testing UKF: .........................
  Testing bigglm_wrapper: ....SSS
  Testing boot: ...S.8................................................................................................................................................................................................................................................................................................................................................................................................................
  testing cloglog link function: ....S
  Testing cpp sampling functions: ..................................................................................................................................................................................................................................................................................................................................................................................................................S.............................................................S....
  Running test_cpp_utils.R:: .S............
  Testing ddhazard w/ generic things and w/ the the EKF : .....................S................
  Testing design_mat_and_risk_obj: ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
  Testing fixed_effects_in_E_step: ........9
  Testing test_fixed_effects_in_M_step: S.S......SS
  Testing 'get_start_values': ....................
  Running tests for hatvalues: ....
  Testing examples in man files: .......S.S....SSSS........S
  Testing loglike: ........................
  Testing options: .
  Testing parallelglm vs. glm: ................................................S
  Testing plot functions: ......................................
  Testing predict: ...............................................................................SS
  Testing print function: ...SS.....
  Testing residuals functions: ..................................................................................................................................................................................................SS
  Testing shiny app: ..
  Testing static_glm: .............................
  Testing summary function: .................
  Testing test_utils: ............S......................................
  Testing weights in fit: ................
  
  ══ 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. ´est_params_dens´ 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. bigglm and my c++ version yields similar results (@test_bigglm_wrapper.R#273) - bigglm failed (likely biglm error in 0.9-1 release)
  
  24. bigglm and my c++ version yields similar results with offsets (@test_bigglm_wrapper.R#298) - bigglm failed (likely biglm error in 0.9-1 release)
  
  25. bigglm and my c++ version yields similar with weights (@test_bigglm_wrapper.R#328) - bigglm failed (likely biglm error in 0.9-1 release)
  
  26. boot yields previously computed values with pbc (@test_boot_est.R#19) - On CRAN
  
  27. cloglog function gives previous result with simulated data using PF_EM and PF_forward_filter (@test_cloglog.R#56) - On CRAN
  
  28. mvrnorm gives expected sample mean and variance (@test_cpp_sample_funcs.R#50) - On CRAN
  
  29. 'mvtrnorm' yields close to uniform sample (@test_cpp_sample_funcs.R#111) - On CRAN
  
  30. trunc_lp_in_exponential_dist does not truncate when not needed (@test_cpp_utils.R#12) - On CRAN
  
  31. Different non-integer time_scales gives the same result with ddhazard (@test_ddhazard_n_EKF.R#165) - On CRAN
  
  32. Only fixed effects yields same results as bigglm with logit model (@test_fixed_effects_in_M_step.R#29) - bigglm failed (likely biglm error in 0.9-1 release)
  
  33. Only fixed effects yields same results as bigglm and static_glm with exponential model (@test_fixed_effects_in_M_step.R#76) - bigglm failed (likely biglm error in 0.9-1 release)
  
  34. posterior_approx gives previous found values with fixed effects in M-step (@test_fixed_effects_in_M_step.R#187) - On CRAN
  
  35. Only fixed effects yields same results as bigglm and static_glm with exponential model with weights (@test_fixed_effects_in_M_step.R#236) - bigglm failed (likely biglm error in 0.9-1 release)
  
  36. residuals.ddhazard help page examples gives the same results (@test_help_page_examples.R#43) - On CRAN
  
  37. ddhazard_boot help page examples gives the same results (@test_help_page_examples.R#67) - On CRAN
  
  38. PF_EM help page example runs and gives previous computed results (@test_help_page_examples.R#129) - On CRAN
  
  39. Second example on PF help page gives the same result (@test_help_page_examples.R#170) - On CRAN
  
  40. example in 'PF_EM' with gives previous results w/ a few iterations (@test_help_page_examples.R#226) - On CRAN
  
  41. `PF_forward_filter` the results stated in the comments and does not alter the .Random.seed as stated on the help page (@test_help_page_examples.R#357) - On CRAN
  
  42. 'PF_get_score_n_hess' gives previous results (@test_help_page_examples.R#515) - On CRAN
  
  43. glm and parallelglm gives the same (@test_parallelglm.R#80) - On CRAN
  
  44. Terms from predict with exponential outcome are correct (@test_predict.R#413) - On CRAN
  
  45. Different non-integer time_scales gives the same result with predict results (@test_predict.R#474) - On CRAN
  
  46. print.ddhazard_boot gives the expected output (@test_print.R#39) - On CRAN
  
  47. Print function for PF objects gives previous results (@test_print.R#89) - On CRAN
  
  48. Gets previous results with Rossi (@test_residuals.R#209) - On CRAN
  
  49. Get prevoius residuals with whas500 (@test_residuals.R#236) - On CRAN
  
  50. Testing util functions to sim series for tests (@test_test_utils.R#28) - On CRAN
  
  ══ Warnings ════════════════════════════════════════════════════════════════════
  1. Changing between woodbury and cholesky makes a slight difference with PBC (@test_SMA.R#77) - EM algorithm did not converge within the n_max number of iterations
  
  2. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Q - Q.t() maximal element difference was 2.5353e+30 in iteration 3
  
  3. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Newton Rapshon in prediction step failed at least once
  
  4. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Q - Q.t() maximal element difference was 1.06338e+37 in iteration 3
  
  5. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Q - Q.t() maximal element difference was 1.54743e+26 in iteration 3
  
  6. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Q - Q.t() maximal element difference was 7.20576e+16 in iteration 3
  
  7. Second order model gives previous found result for posterior approx (@test_SMA.R#151) - Q - Q.t() maximal element difference was 1.09951e+12 in iteration 3
  
  8. Exponential model for posterior_approx gives previous found values (@test_SMA.R#225) - EM algorithm did not converge within the n_max number of iterations
  
  9. Exponential model yields the same results for all the method inputs with same seed (@test_SMA.R#240) - EM algorithm did not converge within the n_max number of iterations
  
  10. Exponential model yields the same results for all the method inputs with same seed (@test_SMA.R#245) - EM algorithm did not converge within the n_max number of iterations
  
  11. Exponential model yields the same results for all the method inputs with same seed (@test_SMA.R#245) - EM algorithm did not converge within the n_max number of iterations
  
  12. Exponential model yields the same results for all the method inputs with same seed (@test_SMA.R#245) - EM algorithm did not converge within the n_max number of iterations
  
  ══ Failed ══════════════════════════════════════════════════════════════════════
  ── 1. Failure: Square triangular inversion works followed by rank one update (@t
  solve(d1) not equal to `d2`.
  15/25 mismatches (average diff: 0.703)
  [1]   0.3908 -  2.5586 == -2.168
  [2]   0.0241 - -0.0874 ==  0.112
  [3]   0.1255 - -0.3374 ==  0.463
  [4]   0.1447 - -0.6215 ==  0.766
  [5]   0.2003 - -0.8917 ==  1.092
  [7]   0.7054 -  1.4176 == -0.712
  [8]  -0.0509 -  0.0749 == -0.126
  [9]  -0.1914 -  0.4559 == -0.647
  [10]  0.4207 - -0.7829 ==  1.204
  ...
  
  ── 2. Failure: Square triangular inversion works followed by rank one update (@t
  solve(d1) not equal to `d2`.
  55/100 mismatches (average diff: 0.626)
  [1]  0.4262 -  2.3463 == -1.9202
  [2] -0.0499 -  0.3039 == -0.3539
  [3] -0.1709 -  0.8763 == -1.0471
  [4] -0.0169 - -0.0718 ==  0.0549
  [5] -0.0783 -  0.3736 == -0.4519
  [6] -0.1376 -  0.5702 == -0.7078
  [7]  0.0589 - -0.0569 ==  0.1158
  [8] -0.0461 -  0.1263 == -0.1725
  [9]  0.0481 - -0.2147 ==  0.2627
  ...
  
  ── 3. Failure: Square triangular inversion works followed by rank one update (@t
  solve(d1) not equal to `d2`.
  1275/2500 mismatches (average diff: 0.269)
  [1]  0.538126 -  1.85830 == -1.3202
  [2]  0.036212 - -0.14812 ==  0.1843
  [3]  0.014338 - -0.05850 ==  0.0728
  [4] -0.033743 -  0.12339 == -0.1571
  [5] -0.006282 -  0.02669 == -0.0330
  [6]  0.010689 - -0.00936 ==  0.0201
  [7] -0.000124 -  0.03283 == -0.0330
  [8]  0.005670 - -0.00541 ==  0.0111
  [9] -0.004830 - -0.01655 ==  0.0117
  ...
  
  ── 4. Failure: Changing between woodbury and cholesky makes a slight difference 
  f1[c("state_vars", "state_vecs")] not equal to f2[c("state_vars", "state_vecs")].
  Component "state_vars": Mean relative difference: 2.096527
  Component "state_vecs": Mean relative difference: 2.414201
  
  ── 5. Error: Second order model gives previous found result for posterior approx
  Failed to estimate model. The following learning rates was tried: 1, 0.9, 0.81, 0.729, 0.6561, 0.59049, 0.531441, 0.4782969, 0.43046721, 0.387420489. Try decreasing the learning rate or change denom_term
  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: stop("Failed to estimate model. The following learning rates was tried: ", paste0(control$LR * 
         control$LR_decrease_fac^k_vals, collapse = ", "), ". Try decreasing the learning rate or change denom_term")
  
  ── 6. Failure: Posterior gives previous found results with large by length for p
  `f1` not equal to read_to_test("posterior_approx_logit_pbc_large_by").
  Component "state_vecs": Mean relative difference: 0.7123655
  Component "state_vecs": Mean relative difference: 0.7123655
  
  ── 7. Failure: Exponential model for posterior_approx gives previous found value
  `f1` not equal to read_to_test("posterior_approx_exp_pbc").
  Component "state_vecs": Mean relative difference: 0.9144229
  Component "state_vecs": Mean relative difference: 0.9144229
  
  ── 8. Failure: Boot works with posterior_approx and gives previous found results
  `tmp` not equal to read_to_test("boot_posterior_approx").
  Component "t0": Mean relative difference: 0.2941322
  Component "t": Mean relative difference: 0.3619236
  
  ── 9. Error: posterior_approx gives previous found values with fixed effects in 
  Failed to estimate model. The following learning rates was tried: 1, 0.9, 0.81, 0.729, 0.6561, 0.59049, 0.531441, 0.4782969, 0.43046721, 0.387420489. Try decreasing the learning rate or change denom_term
  1: ddhazard(Surv(tstart, tstop, death == 2) ~ ddFixed(age) + ddFixed(edema) + log(albumin) + 
         log(protime) + log(bili), pbc2, id = pbc2$id, by = 100, max_T = 3600, control = ddhazard_control(method = "SMA", 
         fixed_terms_method = "E_step"), Q_0 = diag(rep(1e+05, 4)), Q = diag(rep(0.01, 
         4))) at testthat/test_fixed_effects_in_E_step.R:157
  2: stop("Failed to estimate model. The following learning rates was tried: ", paste0(control$LR * 
         control$LR_decrease_fac^k_vals, collapse = ", "), ". Try decreasing the learning rate or change denom_term")
  
  ══ DONE ════════════════════════════════════════════════════════════════════════
  Error: Test failures
  Execution halted