estimateFtimeMissing: Estimate Missing Failure Time mechanism

View source: R/ftime_missing_estimate.R

estimateFtimeMissingR Documentation

Estimate Missing Failure Time mechanism

Description

This function computes the conditional probability of having non-missing ftime for each level of treatment using glm or SuperLearner.

Usage

estimateFtimeMissing(
  dat,
  adjustVars,
  glm.ftimeMissing = NULL,
  SL.ftimeMissing = NULL,
  cvControl,
  returnModels = FALSE,
  verbose = FALSE,
  gtol = 0.001,
  trtOfInterest,
  ...
)

Arguments

dat

An object of class data.frame. Must have named column trt.

adjustVars

An object of class data.frame that will be used either as the data argument in a call to glm or as X in a call to SuperLearner.

glm.ftimeMissing

A character specification of the right-hand side of the equation passed to the formula option of a call to glm for the missingness failure times model. Ignored if SL.ftimeMissing is not equal to NULL. Use "trt" to specify the treatment in this formula (see examples). The formula can additionally include any variables found in names(adjustVars).

SL.ftimeMissing

A character vector or list specification to be passed to the SL.library in the call to SuperLearner for the missingness model for failure time. It is expected that the wrappers used in the library will play nicely with the input variables, which will be called "trt" and names(adjustVars).

cvControl

A list providing control options to be fed directly into calls to SuperLearner. This should match the contents of SuperLearner.CV.control exactly. For details, consult the documentation of the SuperLearner package. This is passed in from mean_tmle or hazard_tmle via survtmle.

returnModels

A logical indicating whether fitted model objects should be returned.

verbose

A logical passed to the verbose option of the call to SuperLearner.

gtol

The truncation level of predicted missingness probabilities to handle positivity violations.

trtOfInterest

An input specifying which levels of trt are of interest. The default value computes estimates for all of the values in unique(trt). Can alternatively be set to a vector of values found in trt.

...

Other arguments. Not currently used

Value

dat The input data.frame object with two added columns corresponding with the conditional probability (given adjustVars) of trt==max(trt) and trt==min(trt).

ftimeMissingMod If returnModels = TRUE, the fitted glm or SuperLearner object. Otherwise, NULL


benkeser/survtmle documentation built on Nov. 23, 2023, 4:45 a.m.