Running ‘testthat.R’ [25s/28s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ltmle)
  > 
  > test_check("ltmle")
  seed set to 1
  deterministic.g.function is inconsistent with data.
  After setting Anodes to abar, the data looks like this:
              W A1 A2 Y
  1 -0.55988703  0  1 1
  2 -0.48264361  0  1 1
  3  1.47292606  0  1 1
  4  1.59422246  0  1 1
  5 -0.73086979  0  1 1
  6 -0.03828922  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.64606 
      Estimated Std Err:  51.661 
                p-value:  0.99002 
      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.6625848 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.66258 
      Estimated Std Err:  0.1234 
                p-value:  9.0887e-06 
      95% Conf Interval: (0.4102, 0.91497) 
  
  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.66258 
      Estimated Std Err:  0.1234 
                p-value:  9.0887e-06 
      95% Conf Interval: (0.4102, 0.91497) 
  
  Control Estimate:
     Parameter Estimate:  0.54468 
      Estimated Std Err:  0.15777 
                p-value:  0.0017275 
      95% Conf Interval: (0.222, 0.86735) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.11791 
      Estimated Std Err:  0.2003 
                p-value:  0.56064 
      95% Conf Interval: (-0.29175, 0.52756) 
  
  Relative Risk:
     Parameter Estimate:  1.2165 
    Est Std Err log(RR):  0.34437 
                p-value:  0.57371 
      95% Conf Interval: (0.60149, 2.4603) 
  
  Odds Ratio:
     Parameter Estimate:  1.6416 
    Est Std Err log(OR):  0.84224 
                p-value:  0.56076 
      95% Conf Interval: (0.29319, 9.191) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
  TMLE Estimate:  0.6625848 
  Estimator:  tmle 
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F)
  
     Parameter Estimate:  0.66258 
      Estimated Std Err:  0.1234 
                p-value:  9.0887e-06 
      95% Conf Interval: (0.4102, 0.91497) 
  
  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.66258 
      Estimated Std Err:  0.1234 
                p-value:  9.0887e-06 
      95% Conf Interval: (0.4102, 0.91497) 
  
  Control Estimate:
     Parameter Estimate:  0.54468 
      Estimated Std Err:  0.15777 
                p-value:  0.0017275 
      95% Conf Interval: (0.222, 0.86735) 
  
  Additive Treatment Effect:
     Parameter Estimate:  0.11791 
      Estimated Std Err:  0.2003 
                p-value:  0.56064 
      95% Conf Interval: (-0.29175, 0.52756) 
  
  Relative Risk:
     Parameter Estimate:  1.2165 
    Est Std Err log(RR):  0.34437 
                p-value:  0.57371 
      95% Conf Interval: (0.60149, 2.4603) 
  
  Odds Ratio:
     Parameter Estimate:  1.6416 
    Est Std Err log(OR):  0.84224 
                p-value:  0.56076 
      95% Conf Interval: (0.29319, 9.191) 
  
  Call:
  ltmle(data = data.frame(W, A, Y), Anodes = "A", Ynodes = "Y", 
      abar = 1, estimate.time = F, gcomp = T)
  
  GCOMP Estimate:  0.6612256 
  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.66123 
      Estimated Std Err:  0.11595 
                p-value:  3.6128e-06 
      95% Conf Interval: (0.42407, 0.89838) 
  
  [ FAIL 4 | WARN 1 | SKIP 6 | PASS 107 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  • empty test (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-BaselineCovMSM.R:29'): constant W in baseline equivalent to constant summary measure ──
  Error in `if (max(abs(variance.estimate - t(variance.estimate))) > 1e-05) stop("not symmetric")`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. └─ltmle::ltmleMSM(...) at test-BaselineCovMSM.R:29:6
   2.   └─ltmle:::LtmleMSMFromInputs(inputs)
   3.     └─ltmle:::MainCalcs(inputs)
   4.       └─ltmle:::FixedTimeTMLE(...)
   5.         └─ltmle:::EstimateVariance(...)
  ── Error ('test-BaselineCovMSM.R:69'): ltmleMSM runs and returns beta with correct names for baseline only, summary only, or both ──
  Error in `if (max(abs(variance.estimate - t(variance.estimate))) > 1e-05) stop("not symmetric")`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-BaselineCovMSM.R:69:2
   2. │ └─base::withCallingHandlers(...)
   3. └─ltmle::ltmleMSM(...)
   4.   └─ltmle:::LtmleMSMFromInputs(inputs)
   5.     └─ltmle:::MainCalcs(inputs)
   6.       └─ltmle:::FixedTimeTMLE(...)
   7.         └─ltmle:::EstimateVariance(...)
  ── Error ('test-ErrorHandling.R:25'): invalid inputs throw errors 2 ────────────
  Error in `if (any(curIC.relative.error > 0.001) && !inputs$gcomp) {
      SetSeedIfRegressionTesting()
      fix.score.list <- FixScoreEquation(Qstar.kplus1, update.list$h.g.ratio, 
          uncensored, intervention.match, Q.est$is.deterministic, 
          Q.est$deterministic.Q, update.list$off, update.list$X, 
          regimes.with.positive.weight)
      Qstar <- fix.score.list$Qstar
      curIC <- CalcIC(Qstar.kplus1, Qstar, update.list$h.g.ratio, 
          uncensored, intervention.match, regimes.with.positive.weight)
      update.list$fit <- fix.score.list$fit
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(...) at test-ErrorHandling.R:25:2
   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::ltmleMSM(...)
   7.   └─ltmle:::LtmleMSMFromInputs(inputs)
   8.     └─ltmle:::MainCalcs(inputs)
   9.       └─ltmle:::FixedTimeTMLE(...)
  ── Error ('test-random.R:73'): simple longitudinal data matches code from Susan Gruber paper ──
  Error in `family$linkfun(mustart)`: Argument mu must be a nonempty numeric vector
  Backtrace:
       ▆
    1. ├─ltmle:::SuppressGivenWarnings(...) at test-random.R:73:4
    2. │ └─base::withCallingHandlers(expr, warning = h)
    3. └─ltmle:::ltmle.sg(...)
    4.   └─ltmle (local) estQ(...)
    5.     └─stats::glm(...)
    6.       ├─base::eval(...)
    7.       │ └─base::eval(...)
    8.       └─stats::glm.fit(...)
    9.         ├─etastart %||% ...
   10.         └─family$linkfun(mustart)
  
  [ FAIL 4 | WARN 1 | SKIP 6 | PASS 107 ]
  Error: Test failures
  Execution halted