View source: R/lmtp_survival.R
lmtp_survival | R Documentation |
Wrapper around lmtp_tmle
and lmtp_sdr
for survival outcomes to estimate the entire survival curve.
Estimates are reconstructed using isotonic regression to enforce monotonicity of the survival curve.
Confidence intervals correspond to marginal confidence intervals for the survival curve, not simultaneous intervals.
lmtp_survival(
data,
trt,
outcomes,
baseline = NULL,
time_vary = NULL,
cens = NULL,
compete = NULL,
shift = NULL,
shifted = NULL,
estimator = c("lmtp_tmle", "lmtp_sdr"),
k = Inf,
mtp = TRUE,
id = NULL,
learners_outcome = "SL.glm",
learners_trt = "SL.glm",
folds = 10,
weights = NULL,
control = lmtp_control()
)
data |
[ |
trt |
[ |
outcomes |
[ |
baseline |
[ |
time_vary |
[ |
cens |
[ |
compete |
[ |
shift |
[ |
shifted |
[ |
estimator |
[ |
k |
[ |
mtp |
[ |
id |
[ |
learners_outcome |
[ |
learners_trt |
[ |
folds |
[ |
weights |
[ |
control |
[ |
A list of class lmtp_survival
containing lmtp
objects for each time point.
# Example 1.1
# Time-to-event analysis with a binary time-invariant exposure. Interested in
# the effect of treatment being given to all observations on the cumulative
# incidence of the outcome.
A <- "trt"
Y <- paste0("Y.", 1:6)
C <- paste0("C.", 0:5)
W <- c("W1", "W2")
curve <- lmtp_survival(sim_point_surv, A, Y, W, cens = C, folds = 1,
shift = static_binary_on, estimator = "lmtp_tmle")
tidy(curve)
# Example 1.2
# Time-to-event analysis with a binary time-invariant exposure and a competing-risk.
lmtp_survival(
data = sim_competing_risks,
trt = "A",
cens = paste0("C", 1:5),
compete = paste0("D", 1:5),
baseline = paste0("W", 1:5),
outcome = paste0("Y", 1:5),
shift = static_binary_on,
folds = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.