
Doubly robust estimator of the average treatment effect with Cox model for survival data
Source:R/ATE_surv.R
drsurv.RdDoubly 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.
Arguments
- y
Observed survival or censoring time; vector of size
n.- d
The event indicator, normally
1 = event, 0 = censored; vector of sizen.- x.cate
Matrix of
p.catebaseline covariates specified in the outcome model; dimensionnbyp.cate.- x.ps
Matrix of
p.psbaseline covariates specified in the treatment model; dimensionnbyp.ps.- x.ipcw
Matrix of
p.ipwbaseline covariate specified in inverse probability of censoring weighting; dimensionnbyp.ipw.- trt
Treatment received; vector of size
nwith treatment coded as 0/1.- yf
Follow-up time, interpreted as the potential censoring time; vector of size
nif 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 inps.model). Relevant only whenps.modelhas 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 is0.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) orsolver = "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) orsolver = "R". Only affects screening whenps.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 grouptrt = 1.rmst0: A numeric value of the estimated restricted mean survival time n the grouptrt = 0.log.rmtl.ratio: A numeric value of the estimated log rmtl ratio.log.hazard.ratio: The conditional log hazard ratio, orNAif not requested.log.cumulative.hazard.ratio: The marginal log cumulative hazard ratio, if requested.
