Gsurv | R Documentation |
Estimate P(T > t | T > truncation time, covariates available at truncation time) for given t, where T is the time to event, using G-computation transformation. Use a user-specified flexible method to fit survival curves of time to event/censoring at each stage and then use SuperLearner::SuperLearner
to regress pseudo-outcome on covariates in order to estimate P(T > t | T > truncation time, covariates available at truncation time).
Gsurv(
covariates,
follow.up.time,
visit.times,
tvals = NULL,
truncation.index = 1,
id.var,
time.var,
event.var,
event.formula = NULL,
Q.formula = ~.,
event.method = c("survSuperLearner", "rfsrc", "ctree", "rpart", "cforest", "coxph",
"coxtime", "deepsurv", "dnnsurv", "akritas", "survival_forest"),
event.control = if (event.method != "survSuperLearner") {
fit_surv_option()
}
else {
fit_surv_option(option = list(event.SL.library = c("survSL.coxph",
"survSL.weibreg", "survSL.gam", "survSL.rfsrc"), cens.SL.library = c("survSL.coxph",
"survSL.weibreg", "survSL.gam", "survSL.rfsrc")))
},
Q.SuperLearner.control = list(family = gaussian(), SL.library = "SL.lm")
)
covariates |
a list of data frames of covarates in the order of visit times. Each data frame contains the covariates collected at a visit time. Data frames may have different numbers of variables (may collect different variables at different visit times) and different numbers of individuals (some individuals may have an event or is censored before a later visit time). All data frames must have a common character variable (see |
follow.up.time |
data frame of follow up times, i.e., times to event/censoring. Contains the variable that identifies each individual, the follow up times and an indicator of event/(right-)censoring. Follow up times must be numeric. Indicator of event/censoring should be binary with 0=censored, 1=event. |
visit.times |
numeric/integer vector of visit times in ascending order. The first visit time is typically the baseline. |
tvals |
times t for which P(T > t) given covariates are computed (T is the time to event). Default is all unique event times in |
truncation.index |
index of the visit time to which left-truncation is applied. The truncation time is |
id.var |
(character) name of the variable that identifies each individual. |
time.var |
(character) name of the variable containing follow up times in the data frame |
event.var |
(character) name of the variable containing indicator of event/censoring in the data frame |
event.formula |
a list of formulas to specify covariates being used when estimating the conditional survival probabilities of time to event at each visit time. The length should be the number of visit times after |
Q.formula |
formula to specify covariates being used for estimating P(T > t | T > |
event.method |
one of |
event.control |
a returned value from |
Q.SuperLearner.control |
a list containing optional arguments passed to |
a list of fitted SuperLearner
models corresponding to each t in tvals
.
All formulas should have covariates on the right-hand side and no terms on the left-hand side, e.g., ~ V1 + V2 + V3
. At each visit time, the corresponding formulas may (and usually should) contain covariates at previous visit times, and must only include available covariates up to (inclusive) that visit time. Interactions, polynomials and splines may be treated differently by different machine learning methods to estimate conditional survival curves.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.