Closed nt-williams closed 2 weeks ago
I've noticed this error also occurs if staticbinary* is accidentally used with a numerical treatment. Perhaps this could be incorporated into suggestions for the user to debug?
Reprex is the same as Example 4.1 in ?lmtp_tmle
, with only the shift changed from NULL
to static_binary_on
.
library(lmtp)
A <- c("A1", "A2")
L <- list(c("L1"), c("L2"))
C <- c("C1", "C2")
Y <- "Y"
progressr::with_progress(
lmtp_tmle(data = sim_cens,
A,
time_vary = L,
Y,
cens = C,
shift = static_binary_on,
folds = 2)
)
Capture this error message and indicate setting
intervention_type = "mtp"
will likely fix it.