Skip to contents

Doubly robust estimator of the average treatment effect between two treatments, which is the restricted mean time lost (RMTL) ratio of treatment 1 over treatment 0 for survival outcomes.

Usage

drsurv(
  y,
  d,
  x.cate,
  x.ps,
  x.ipcw,
  trt,
  yf = NULL,
  tau0,
  surv.min = 0.025,
  ps.method = "glm",
  minPS = 0.01,
  maxPS = 0.99,
  ipcw.method = "breslow",
  rmst.control = list(),
  ps.control = list(),
  cumulative.hr = FALSE,
  conditional.hr = TRUE,
  diagnostic = FALSE,
  outcome_method = "coxph"
)

Arguments

y

Observed survival or censoring time; vector of size n.

d

The event indicator, normally 1 = event, 0 = censored; vector of size n.

x.cate

Matrix of p.cate baseline covariates specified in the outcome model; dimension n by p.cate.

x.ps

Matrix of p.ps baseline covariates specified in the treatment model; dimension n by p.ps.

x.ipcw

Matrix of p.ipw baseline covariate specified in inverse probability of censoring weighting; dimension n by p.ipw.

trt

Treatment received; vector of size n with treatment coded as 0/1.

yf

Follow-up time, interpreted as the potential censoring time; vector of size n if the potential censoring time is known.

tau0

The truncation time for defining restricted mean time lost.

surv.min

Lower truncation limit for probability of being censored (positive and very close to 0).

ps.method

A character value for the method to estimate the propensity score. Allowed values include one of: 'glm' for logistic regression with main effects only (default), or 'lasso' for a logistic regression with main effects and LASSO penalization on two-way interactions (added to the model if interactions are not specified in ps.model). Relevant only when ps.model has more than one variable.

minPS

A numerical value (in `[0, 1]`) below which estimated propensity scores should be truncated. Default is 0.01.

maxPS

A numerical value (in `(0, 1]`) above which estimated propensity scores should be truncated. Must be strictly greater than minPS. Default is 0.99.

ipcw.method

The censoring model. Allowed values are: 'breslow' (Cox regression with Breslow estimator of the baseline survivor function), 'aft (exponential)', 'aft (weibull)', 'aft (lognormal)' or 'aft (loglogistic)'. Default is 'breslow'.

rmst.control

Named options for Cox restricted mean survival integration. Supported entry: solver = "C" (default) or solver = "R". The C backend accumulates each patient's integral without allocating a patient-by-event-time matrix. Cox model fitting is unchanged. Applies to Cox outcome models only; parametric models use closed-form integration.

ps.control

Named options for LASSO propensity-score interaction screening. Supported entry: solver = "C" (default) or solver = "R". Only affects screening when ps.method = "lasso"; the LASSO fit and interaction selection rule are unchanged. Kept separate from boosting's ... and other numerical controls.

cumulative.hr

Whether to estimate the marginal cumulative hazard ratio at tau0.

conditional.hr

Whether to fit the supplementary conditional Cox hazard ratio.

diagnostic

Internal: retain full-sample treatment overlap diagnostics.

outcome_method

Outcome-model method: "coxph", "weibull", or "log_normal".

Value

Return a list of estimates:

  • rmst1: A numeric value of the estimated restricted mean survival time n the group trt = 1.

  • rmst0: A numeric value of the estimated restricted mean survival time n the group trt = 0.

  • log.rmtl.ratio: A numeric value of the estimated log rmtl ratio.

  • log.hazard.ratio: The conditional log hazard ratio, or NA if not requested.

  • log.cumulative.hazard.ratio: The marginal log cumulative hazard ratio, if requested.