Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(riskRegression)
  riskRegression version 2023.12.21
  > 
  > test_check("riskRegression")
  [iidCox] internal consistency 
  [predictCox] Estimation of the baseline hazard (no strata) 
  [predictCox] Estimation of the baseline hazard (strata) 
  [predictCox] Estimation of the baseline hazard (time varying cov, no strata) 
  [predictCox] Estimation of the baseline hazard (time varying cov, strata) 
  [predictCox] Predictions (no strata, continuous) 
  [predictCoxPL] Check baseline hazard estimation vs survfit 
  [predictRisk.rfsrc]  
  [predictRisk.CauseSpecificCox] 
  [predictRisk.glm] vs. lava 
  Testing binary data with 
  Testing survival data with 
  Testing competing.risks data with 
  [1] "binary"
  [ FAIL 24 | WARN 4 | SKIP 0 | PASS 43 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-BinomialRegression.R:11:5'): Absolute risk regression ──────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(300, outcome = "competing.risks") at test-BinomialRegression.R:11:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-BinomialRegression.R:33:5'): Logistic risk regression ──────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimCompRisk(100) at test-BinomialRegression.R:33:5
    2.   └─prodlim::crModel()
    3.     ├─lava::`distribution<-`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    4.     └─lava:::`distribution<-.lvm`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-CauseSpecificCoxRegression.R:40:9'): predictSurv ───────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimSurv(100) at test-CauseSpecificCoxRegression.R:40:9
    2.   └─prodlim::survModel()
    3.     └─lava::lvm(~eventtime + censtime)
    4.       ├─lava::`regression<-`(`*tmp*`, messages = messages, value = myvar)
    5.       └─lava:::`regression<-.lvm`(`*tmp*`, messages = messages, value = myvar)
    6.         └─lava::procformula(object, value, ...)
    7.           ├─lava::`exogenous<-`(...)
    8.           └─lava:::`exogenous<-.lvm`(...)
    9.             └─lava::reindex(x)
   10.               └─lava:::mat.lvm(x, res)
   11.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-CauseSpecificCoxRegression.R:54:5'): Cox models ────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimCompRisk(100) at test-CauseSpecificCoxRegression.R:54:5
    2.   └─prodlim::crModel()
    3.     ├─lava::`distribution<-`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    4.     └─lava:::`distribution<-.lvm`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-CauseSpecificCoxRegression.R:67:5'): strata ────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimCompRisk(100) at test-CauseSpecificCoxRegression.R:67:5
    2.   └─prodlim::crModel()
    3.     ├─lava::`distribution<-`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    4.     └─lava:::`distribution<-.lvm`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-FineGrayRegression.R:9:5'): Formula interface ──────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimCompRisk(100) at test-FineGrayRegression.R:9:5
    2.   └─prodlim::crModel()
    3.     ├─lava::`distribution<-`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    4.     └─lava:::`distribution<-.lvm`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-iidCox.R:35:1'): (code run outside of `test_that()`) ───────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(20, outcome = "survival") at test-iidCox.R:35:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-phreg.R:32:1'): (code run outside of `test_that()`) ────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(50, outcome = "survival") at test-phreg.R:32:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-plotRisk.R:27:2'): More than one competing risk ────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(80, outcome = "competing.risk") at test-plotRisk.R:27:2
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-predictCox.R:191:1'): (code run outside of `test_that()`) ──────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(50, outcome = "survival") at test-predictCox.R:191:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-predictCoxPL.R:27:1'): (code run outside of `test_that()`) ─────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(25, outcome = "survival") at test-predictCoxPL.R:27:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-predictRisk-TD.R:51:5'): start stop CauseSpecificCox ───────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(201, outcome = "competing.risk") at test-predictRisk-TD.R:51:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-predictRisk.R:49:5'): Prediction with CSC - categorical cause ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─prodlim::SimCompRisk(n) at test-predictRisk.R:49:5
    2.   └─prodlim::crModel()
    3.     ├─lava::`distribution<-`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    4.     └─lava:::`distribution<-.lvm`(`*tmp*`, "eventtime1", value = lava::coxWeibull.lvm(scale = 1/100))
    5.       ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    6.       └─lava:::`addvar<-.lvm`(...)
    7.         ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    8.         └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    9.           └─lava::procformula(object, value, ...)
   10.             ├─lava::`exogenous<-`(...)
   11.             └─lava:::`exogenous<-.lvm`(...)
   12.               └─lava::reindex(x)
   13.                 └─lava:::mat.lvm(x, res)
   14.                   └─base::cbind(idxM, pidxM)
  ── Error ('test-predictRisk.R:90:1'): (code run outside of `test_that()`) ──────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n, outcome = "binary") at test-predictRisk.R:90:1
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score-train-test.R:20:7'): Testing binary data with  ───────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n = train.sample.size, outcome = typ$data) at test-score-train-test.R:20:7
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score-train-test.R:20:7'): Testing survival data with  ─────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n = train.sample.size, outcome = typ$data) at test-score-train-test.R:20:7
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score-train-test.R:20:7'): Testing competing.risks data with  ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n = train.sample.size, outcome = typ$data) at test-score-train-test.R:20:7
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:33:5'): R squared/IPA ──────────────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(43, outcome = "binary") at test-score.R:33:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:47:5'): binary outcome: robustness against order of data set ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(43, outcome = "binary") at test-score.R:47:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:79:9'): survival outcome,Brier Score, external prediction ──
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n, outcome = "survival") at test-score.R:79:9
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:107:9'): integrated Brier score ────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(100, outcome = "survival") at test-score.R:107:9
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:145:9'): survival outcome uncensored ───────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(100, outcome = "survival") at test-score.R:145:9
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-score.R:158:5'): binary outcome: Brier ─────────────────────────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n = 47, outcome = "binary") at test-score.R:158:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  ── Error ('test-summary-score.R:26:5'): (code run outside of `test_that()`) ────
  Error in `cbind(idxM, pidxM)`: cannot get data pointer of 'NULL' objects
  Backtrace:
       ▆
    1. └─riskRegression::sampleData(n = 112, outcome = y) at test-summary-score.R:26:5
    2.   ├─lava::`distribution<-`(...)
    3.   └─lava:::`distribution<-.lvm`(...)
    4.     ├─lava::`addvar<-`(`*tmp*`, value = as.formula(paste("~", variable)))
    5.     └─lava:::`addvar<-.lvm`(...)
    6.       ├─lava::`regression<-`(`*tmp*`, ..., value = value)
    7.       └─lava:::`regression<-.lvm`(`*tmp*`, ..., value = value)
    8.         └─lava::procformula(object, value, ...)
    9.           ├─lava::`exogenous<-`(...)
   10.           └─lava:::`exogenous<-.lvm`(...)
   11.             └─lava::reindex(x)
   12.               └─lava:::mat.lvm(x, res)
   13.                 └─base::cbind(idxM, pidxM)
  
  [ FAIL 24 | WARN 4 | SKIP 0 | PASS 43 ]
  Error: Test failures
  Execution halted