Running ‘testthat.R’ [29s/44s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ltmle)
  > 
  > test_check("ltmle")
  seed set to 1
  Failed with error:  'there is no package called 'SuperLearner''
  Failed with error:  'there is no package called 'SuperLearner''
  Failed with error:  'there is no package called 'SuperLearner''
  Estimator:  tmle 
              Estimate Std. Error CI 2.5% CI 97.5% p-value
  (Intercept)  -3.5478         NA      NA       NA      NA
  time          0.5402         NA      NA       NA      NA
  switch.time       NA         NA      NA       NA      NA
  deterministic.g.function is inconsistent with data.
  After setting Anodes to abar, the data looks like this:
              W A1 A2 Y
  1  0.03835163  0  1 1
  2  0.14398998  0  1 1
  3 -0.10516484  0  1 0
  4 -1.04478516  0  1 1
  5 -1.48427070  0  1 0
  6  0.16540946  0  1 1
  Estimator:  tmle 
  Call:
  ltmle(data = data, Anodes = "A", Ynodes = "Y", abar = 1, gbounds = c(0, 
      1), estimate.time = FALSE)
  
     Parameter Estimate:  0.68563 
      Estimated Std Err:  234.15 
                p-value:  0.99766 
      95% Conf Interval: (0, 1) 
  
  Error in solve.default(a) : 
    Lapack routine dgesv: system is exactly singular: U[2,2] = 0
  Error in solve.default(a, b) : 
    Lapack routine dgesv: system is exactly singular: U[2,2] = 0
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.7150438 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.71504 
      Estimated Std Err:  0.15945 
                p-value:  0.00010602 
      95% Conf Interval: (0.38893, 1) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Use summary(...) to get estimates, standard errors, p-values, and confidence intervals for treatment EYd, control EYd, additive effect, relative risk, and odds ratio.
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Treatment Estimate:
     Parameter Estimate:  0.71504 
      Estimated Std Err:  0.15945 
                p-value:  0.00010602 
      95% Conf Interval: (0.38893, 1) 
  
  Control Estimate:
     Parameter Estimate:  0.50203 
      Estimated Std Err:  0.12497 
                p-value:  0.00038175 
      95% Conf Interval: (0.24644, 0.75762) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.21301 
      Estimated Std Err:  0.19697 
                p-value:  0.28839 
      95% Conf Interval: (-0.18983, 0.61586) 
  
  Relative Risk:
     Parameter Estimate:  1.4243 
    Est Std Err log(RR):  0.32059 
                p-value:  0.279 
      95% Conf Interval: (0.73934, 2.7439) 
  
  Odds Ratio:
     Parameter Estimate:  2.489 
    Est Std Err log(OR):  0.90904 
                p-value:  0.32409 
      95% Conf Interval: (0.38779, 15.976) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.7150438 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.71504 
      Estimated Std Err:  0.15945 
                p-value:  0.00010602 
      95% Conf Interval: (0.38893, 1) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Use summary(...) to get estimates, standard errors, p-values, and confidence intervals for treatment EYd, control EYd, additive effect, relative risk, and odds ratio.
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = list(1, 0), estimate.time = F)
  
  Treatment Estimate:
     Parameter Estimate:  0.71504 
      Estimated Std Err:  0.15945 
                p-value:  0.00010602 
      95% Conf Interval: (0.38893, 1) 
  
  Control Estimate:
     Parameter Estimate:  0.50203 
      Estimated Std Err:  0.12497 
                p-value:  0.00038175 
      95% Conf Interval: (0.24644, 0.75762) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.21301 
      Estimated Std Err:  0.19697 
                p-value:  0.28839 
      95% Conf Interval: (-0.18983, 0.61586) 
  
  Relative Risk:
     Parameter Estimate:  1.4243 
    Est Std Err log(RR):  0.32059 
                p-value:  0.279 
      95% Conf Interval: (0.73934, 2.7439) 
  
  Odds Ratio:
     Parameter Estimate:  2.489 
    Est Std Err log(OR):  0.90904 
                p-value:  0.32409 
      95% Conf Interval: (0.38779, 15.976) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
  GCOMP Estimate:  0.7274786 
  Estimator:  gcomp 
  Warning: inference for gcomp is not accurate! It is based on TMLE influence curves.
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
     Parameter Estimate:  0.72748 
      Estimated Std Err:  0.11672 
                p-value:  8.4279e-07 
      95% Conf Interval: (0.48876, 0.9662) 
  
  [ FAIL 3 | WARN 0 | SKIP 6 | PASS 165 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  • empty test (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-CheckInputs.R:132:3): cvControl requires correct names and makes a difference ──
  `ltmle(...)` threw an error with unexpected message.
  Expected match: "SL.cvControl must be a list"
  Actual message: "SuperLearner package is required if SL.library is not NULL or 'glm'"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-CheckInputs.R:132:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─ltmle::ltmle(...)
   7.   └─ltmle:::CreateInputs(...)
   8.     └─ltmle:::CheckInputs(...)
  ── Failure (test-CheckInputs.R:133:3): cvControl requires correct names and makes a difference ──
  `ltmle(...)` threw an error with unexpected message.
  Expected match: "The valid names for SL.cvControl are V, stratifyCV, shuffle. validRows is not currently supported."
  Actual message: "SuperLearner package is required if SL.library is not NULL or 'glm'"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-CheckInputs.R:133:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─ltmle::ltmle(...)
   7.   └─ltmle:::CreateInputs(...)
   8.     └─ltmle:::CheckInputs(...)
  ── Error (test-CheckInputs.R:134:3): cvControl requires correct names and makes a difference ──
  Error in `CheckInputs(data, all.nodes, survivalOutcome, Qform, gform, gbounds, 
      Yrange, deterministic.g.function, SL.library, SL.cvControl, 
      regimes, working.msm, summary.measures, final.Ynodes, stratify, 
      msm.weights, deterministic.Q.function, observation.weights, 
      gcomp, variance.method, id)`: SuperLearner package is required if SL.library is not NULL or 'glm'
  Backtrace:
      ▆
   1. └─ltmle::ltmle(...) at test-CheckInputs.R:134:2
   2.   └─ltmle:::CreateInputs(...)
   3.     └─ltmle:::CheckInputs(...)
  
  [ FAIL 3 | WARN 0 | SKIP 6 | PASS 165 ]
  Error: Test failures
  Execution halted