
Restricted Mean Survival Time (RMST) Difference Inference for Survival Responses
Source:R/inference_survival_rmst.R
InferenceSurvivalRestrictedMeanDiff.RdFits a non-parametric treatment-effect estimator for censored survival
responses: the difference in restricted mean survival time (RMST)
between the treated and control arms, \(\hat\mu_T(\tau) - \hat\mu_C(\tau)\),
where each arm's RMST is the area under its Kaplan-Meier survival curve up to
a truncation horizon \(\tau\) (\(\hat\mu(\tau) = \int_0^\tau \hat S(t)\,dt\)),
computed by trapezoidal integration of the step-function KM curve. The
standard error of the difference comes from the Greenwood-type variance of
each arm's RMST, combined across the two (independent) arms via
get_restricted_mean_se_diff(). When that standard error is
unavailable or non-finite, $compute_asymp_confidence_interval() falls
back to a nonparametric bootstrap interval rather than returning NA.
Randomization confidence intervals are not supported (the RMST-difference
units are not commensurate with the randomization CI bisection algorithm's
transformed-scale null search).
References
Royston, P., and Parmar, M. K. B. (2013). "Restricted mean survival time: an alternative to the hazard ratio for the design and analysis of randomized trials with a time-to-event outcome." BMC Medical Research Methodology, 13, 152, doi:10.1186/1471-2288-13-152 , for RMST as a treatment-effect summary. Kaplan, E. L., and Meier, P. (1958). "Nonparametric Estimation from Incomplete Observations." Journal of the American Statistical Association, 53(282), 457-481, doi:10.2307/2281868 , for the underlying survival curve estimator each arm's RMST is integrated from.
Super class
Inference -> InferenceSurvivalRestrictedMeanDiff
Methods
Public methods
+ inherited public methods from Inference
Inference$capabilities()Inference$compute_exact_confidence_interval()Inference$compute_exact_two_sided_pval_for_treatment_effect()Inference$duplicate()Inference$get_analysis_data()Inference$get_covariates()Inference$get_design_object()Inference$get_model_formula()Inference$get_nonestimable_reason()Inference$get_nonestimable_stage()Inference$get_optimization_alg()Inference$get_response()Inference$get_response_type()Inference$get_treatment()Inference$is_nonestimable()Inference$set_optimization_alg()Inference$set_seed()Inference$supports()
InferenceSurvivalRestrictedMeanDiff$new()
Uses the shared randomization two-sided p-value contract; see
InferenceRand.
Initialize restricted-mean-survival-time difference
inference and prepare treatment-group survival summaries used by
InferenceSurvivalRestrictedMeanDiff.
Usage
InferenceSurvivalRestrictedMeanDiff$new(
des_obj,
model_formula = NULL,
verbose = FALSE,
smart_cold_start_default = NULL
)Arguments
des_objThe design object.
model_formulaOptional formula for covariate adjustment. If
NULL(default), the formula from the design object is used and its pre-computed design matrix is reused. If a formula is provided, a new design matrix is constructed from the design's imputed covariates.verboseIf TRUE, print additional information.
smart_cold_start_defaultWhether to use smart cold start values by default.
InferenceSurvivalRestrictedMeanDiff$compute_estimate()
Computes the class-specific mean or survival contrast; see
InferenceMLEorKMSummaryTable.
InferenceSurvivalRestrictedMeanDiff$compute_estimate_with_bootstrap_weights()
Recomputes the class-specific treatment estimate for a bootstrap sample; see
InferenceNonParamBootstrap.
InferenceSurvivalRestrictedMeanDiff$compute_asymp_confidence_interval()
Computes a \(1-\alpha\) level Wald confidence interval for the RMST-difference treatment effect \(\hat\mu_T(\tau) - \hat\mu_C(\tau)\), using its Greenwood-based standard error (see class documentation). Falls back to a nonparametric bootstrap interval if that standard error is unavailable or non-finite.
InferenceSurvivalRestrictedMeanDiff$compute_asymp_two_sided_pval()
Computes a two-sided Wald p-value testing \(H_0:
\mu_T(\tau) - \mu_C(\tau) = 0\) (only delta = 0 is currently
supported; a non-zero null raises an error), using the RMST-difference
estimate and its Greenwood-based standard error — see class
documentation. Falls back to a nonparametric bootstrap p-value if that
standard error is unavailable.
InferenceSurvivalRestrictedMeanDiff$compute_rand_confidence_interval()
Uses the shared randomization confidence-interval contract; see
InferenceRandCI.
Usage
InferenceSurvivalRestrictedMeanDiff$compute_rand_confidence_interval(
alpha = 0.05,
r = 501,
pval_epsilon = 0.005,
show_progress = TRUE,
ci_search_control = NULL
)Arguments
alphaThe confidence level in the computed confidence interval is 1 -
alpha. The default is 0.05.rThe number of randomization vectors. The default is 501.
pval_epsilonThe bisection algorithm tolerance. The default is 0.005.
show_progressShow a text progress indicator.
ci_search_controlUnused.
Examples
# \donttest{
seq_des = DesignSeqOneByOneBernoulli$new(n = 10, response_type = 'survival')
for (i in 1:10) {
seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
}
seq_des$add_all_subject_responses(runif(10))
inf = InferenceSurvivalRestrictedMeanDiff$new(seq_des)
inf$compute_estimate()
#> [1] 0.05757811
# }