Running ‘testthat.R’ [22s/23s]
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''
  Saving _problems/test-CheckInputs-132.R
  Failed with error:  'there is no package called 'SuperLearner''
  Saving _problems/test-CheckInputs-133.R
  Failed with error:  'there is no package called 'SuperLearner''
  Saving _problems/test-CheckInputs-134.R
  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  1.6973939  0  1 1
  2  1.0638812  0  1 1
  3 -0.7666166  0  1 0
  4  0.3820076  0  1 0
  5  0.2418959  0  1 1
  6 -1.1327594  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.60362 
      Estimated Std Err:  287.87 
                p-value:  0.99833 
      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.5891077 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.58911 
      Estimated Std Err:  0.10025 
                p-value:  2.2363e-06 
      95% Conf Interval: (0.38408, 0.79414) 
  
  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.58911 
      Estimated Std Err:  0.10025 
                p-value:  2.2363e-06 
      95% Conf Interval: (0.38408, 0.79414) 
  
  Control Estimate:
     Parameter Estimate:  0.49873 
      Estimated Std Err:  0.19951 
                p-value:  0.018337 
      95% Conf Interval: (0.090676, 0.90678) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.090378 
      Estimated Std Err:  0.22265 
                p-value:  0.68778 
      95% Conf Interval: (-0.36499, 0.54575) 
  
  Relative Risk:
     Parameter Estimate:  1.1812 
    Est Std Err log(RR):  0.43379 
                p-value:  0.70384 
      95% Conf Interval: (0.48643, 2.8684) 
  
  Odds Ratio:
     Parameter Estimate:  1.441 
    Est Std Err log(OR):  0.89643 
                p-value:  0.68658 
      95% Conf Interval: (0.23038, 9.0138) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.5891077 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.58911 
      Estimated Std Err:  0.10025 
                p-value:  2.2363e-06 
      95% Conf Interval: (0.38408, 0.79414) 
  
  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.58911 
      Estimated Std Err:  0.10025 
                p-value:  2.2363e-06 
      95% Conf Interval: (0.38408, 0.79414) 
  
  Control Estimate:
     Parameter Estimate:  0.49873 
      Estimated Std Err:  0.19951 
                p-value:  0.018337 
      95% Conf Interval: (0.090676, 0.90678) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.090378 
      Estimated Std Err:  0.22265 
                p-value:  0.68778 
      95% Conf Interval: (-0.36499, 0.54575) 
  
  Relative Risk:
     Parameter Estimate:  1.1812 
    Est Std Err log(RR):  0.43379 
                p-value:  0.70384 
      95% Conf Interval: (0.48643, 2.8684) 
  
  Odds Ratio:
     Parameter Estimate:  1.441 
    Est Std Err log(OR):  0.89643 
                p-value:  0.68658 
      95% Conf Interval: (0.23038, 9.0138) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
  GCOMP Estimate:  0.6098368 
  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.60984 
      Estimated Std Err:  0.10069 
                p-value:  1.3631e-06 
      95% Conf Interval: (0.40391, 0.81576) 
  
  [ FAIL 3 | WARN 153 | SKIP 6 | PASS 164 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (4): 'test-(init).R:5:3', 'test-EstimateVariance.R:4:3',
    'test-Weights.R:73:3', 'test-random.R:7:3'
  • empty test (2): 'test-AbarAndRegimes.R:84:1', 'test-print.R:3:1'
  
  ══ 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:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .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:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .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:3
   2.   └─ltmle:::CreateInputs(...)
   3.     └─ltmle:::CheckInputs(...)
  
  [ FAIL 3 | WARN 153 | SKIP 6 | PASS 164 ]
  Error:
  ! Test failures.
  Execution halted