CFsurvival.nuisance.options: Initialize options for nuisance estimation

View source: R/fit_survival.R

CFsurvival.nuisance.optionsR Documentation

Initialize options for nuisance estimation

Description

This function initializes the options for nuisance parameter estimation (i.e. conditional survivals of event and censoring and treatment propensity) for use in CFsurvival. The conditional survivals of event and censoring are estimated using survSuperLearner, or any of the individual learners therein. Treatment propensity is estimated using the SuperLearner, or any of the individual learners therein. Alternatively, the estimation process can be overriden by providing predictions from pre-fit nuisance estimators.

Usage

CFsurvival.nuisance.options(
  cross.fit = TRUE,
  V = ifelse(cross.fit, 10, 1),
  folds = NULL,
  eval.times = NULL,
  event.SL.library = lapply(c("survSL.km", "survSL.coxph", "survSL.expreg",
    "survSL.weibreg", "survSL.loglogreg", "survSL.gam", "survSL.rfsrc"), function(alg)
    c(alg, "survscreen.glmnet", "survscreen.marg", "All")),
  event.pred.0 = NULL,
  event.pred.1 = NULL,
  cens.SL.library = lapply(c("survSL.km", "survSL.coxph", "survSL.expreg",
    "survSL.weibreg", "survSL.loglogreg", "survSL.gam", "survSL.rfsrc"), function(alg)
    c(alg, "survscreen.glmnet", "survscreen.marg", "All")),
  cens.trunc = 0,
  cens.pred.0 = NULL,
  cens.pred.1 = NULL,
  survSL.control = list(initWeightAlg = "survSL.rfsrc", verbose = FALSE),
  survSL.cvControl = list(V = 10),
  save.nuis.fits = FALSE,
  prop.SL.library = lapply(c("SL.mean", "SL.glm", "SL.gam", "SL.earth", "SL.ranger",
    "SL.xgboost"), function(alg) c(alg, "screen.glmnet", "screen.corRank", "All")),
  prop.trunc = 0,
  prop.pred = NULL,
  verbose = FALSE
)

Arguments

cross.fit

Logical indicating whether to cross-fit nuisance parameters. Defaults to TRUE.

V

Positive integer number of folds for cross-fitting. Defaults to 10.

folds

Optional n x 1 vector indicating which fold each observation is in. If NULL, folds will be randomly assigned in such a way to balance observed events across folds.

eval.times

Grid of time values on which to perform the estimation procedure. Defaults to the sorted unique values in time.

event.SL.library

The library of candidate learners to be passed on to survSuperLearner to estimate the conditional survival of the event. If only a single learner is provided(e.g. survSL.km for Kaplan-Meier estimator, survSL.coxph for Cox model, or survSL.rfsrc for survival random forest), then just this learner will be used, and no super learning will be performed. Defaults to a full library with screening and all algorithms currently implemented in survSuperLearner. If event.SL.library = NULL, then event.pred.0 and/or event.pred.1 must be specified.

event.pred.0

Optional n x k matrix of estimates of the conditional survival of the event given treatment = 0 and confounders. If event.SL.library = NULL and 0 %in% fit.treat, then event.pred.0 must be specified. If event.SL.library is not NULL, then event.pred.0 is ignored.

event.pred.1

Optional n x k matrix of estimates of the conditional survival of the event given treatment = 1 and confounders. If event.SL.library = NULL and 1 %in% fit.treat, then event.pred.1 must be specified. If event.SL.library is not NULL, then event.pred.1 is ignored.

cens.SL.library

The library of candidate learners to estimate the conditional survival of censoring. As with event.SL.library, single learners can be specified. Defaults to a full library with screening and all algorithms currently implemented in survSuperLearner. If cens.SL.library = NULL, then cens.pred.0 and/or cens.pred.1 must be specified.

cens.trunc

Optional lower truncation for censoring probabilities. Any estimated probabilities less than cens.trunc will be set to cens.trunc. Defaults to zero, i.e. no truncation.

cens.pred.0

Optional n x k matrix of estimates of the conditional survival of censoring given treatment = 0 and confounders. If cens.SL.library = NULL and 0 %in% fit.treat, then cens.pred.0 must be specified. If cens.SL.library is not NULL, then cens.pred.0 is ignored.

cens.pred.1

Optional n x k matrix of estimates of the conditional survival of censoring given treatment = 1 and confounders. If cens.SL.library = NULL and 1 %in% fit.treat, then cens.pred.1 must be specified. If cens.SL.library is not NULL, then cens.pred.1 is ignored.

survSL.control

Optional list of controls to be passed to survSuperLearner. See survSuperLearner.control.

survSL.cvControl

Optional list of controls to be passed to survSuperLearner. See survSuperLearner.CV.control.

save.nuis.fits

Logical indicating whether to save the fitted nuisance objects.

prop.SL.library

The library to use for estimation of the treatment propensities using SuperLearner. If only a single learner is provided(e.g. SL.mean for marginal mean, SL.glm for logistic regression, or SL.ranger for random forest), then just this learner will be used, and no super learning will be performed. If prop.SL.library = NULL, then prop.pred must be provided.

prop.trunc

Optional lower truncation for propensities. If 0 is in fit.treat, then any estimated propensities greater than 1-prop.trunc will be set to 1-prop.trunc. If 1 is in fit.treat, then any estimated propensities less than prop.trunc will be set to prop.trunc. Defaults to zero, i.e. no truncation.

prop.pred

Optional n x 1 numeric vector of estimated probabilities that treat = 1 given the confounders. If prop.SL.library = NULL, then prop.pred must be specified, otherwise it is ignored.

Value

Named list containing the nuisance options.


tedwestling/CFsurvival documentation built on July 27, 2023, 11:35 a.m.