--- title: "Restricted mean survival time (RMST)" author: "Yujie Zhao, Yilong Zhang" output: rmarkdown::html_vignette bibliography: simtrial.bib vignette: > %\VignetteIndexEntry{Restricted mean survival time (RMST)} %\VignetteEngine{knitr::rmarkdown} --- ```{r, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) run <- requireNamespace("gt", quietly = TRUE) && requireNamespace("survRM2", quietly = TRUE) knitr::opts_chunk$set(eval = run) ``` # Introduction Restricted mean survival time (RMST) is defined as the area under the survival curve up to a specific time point. It can be interpreted as the average survival time during a defined time period ranging from time 0 to a specific follow-up time point, which is a straightforward and clinically meaningful way to interpret the contrast in survival between groups. The RMST may provide valuable information for comparing two survival curves when the proportional hazards assumption is not met, such as in cases of *crossing* or *delayed separation* of survival curves. # RMST vs. logrank The log-rank test calculates the test statistics using the survival rate at each time point, and then summarizes them to test the equality of the survival curves as a whole for the entire follow-up period. A comparison of the RMST between two survival curves provides an estimate of the duration of time gained or lost associated with the exposure. Although RMST has an advantage over the hazard ratio, a previous study showed that the difference in RMST often has operating characteristics similar to the log-rank test under the proportional hazards assumption [@royston2013restricted]. However, in the case of crossing survival curves, the efficacy of an intervention may be demonstrated by showing a difference in RMST between the two curves, although the log-rank test may fail to detect a difference because of the occurrence of non-proportional hazards. # Estimation of RMST in a single arm at a single time point Assume the event time as $T$, and the survival function as $S(t) = Pr(T>t)$. The restricted mean survival time at a pre-specified cutoff time point $\tau$ is $$ \text{RMST}(\tau) = E[\min (T, \tau)] = \int_{0}^{\tau} S(u) d u. $$ Suppose there are $D$ events, with distinct observed event times at $t_1 < t_2 < \ldots gt() ``` ## Estimation of RMST differences in 2 arms at a single time point Let $\text{RMST}_{1}(\tau)$ and $\text{RMST}_{2}(\tau)$ be the RMST of treatment group 1 and 2 at predefined time $\tau$, the RMST difference between the 2 treatment groups ($\theta$) can be defined as $$ \theta = \text{RMST}_1(\tau) - \text{RMST}_2(\tau). $$ The expected value of $\theta$ is $E(\theta) = E[\text{RMST}_{1}(\tau)] - E[\text{RMST}_{2}(\tau)]$. If two treatment groups are independent, the variance of $\theta$ is $$ \text{Var}(\theta) = \sigma_{1}^{2} + \sigma_{2}^{2} $$ Similarly, the $(1-\alpha)$ confidence interval for RMST difference between 2 groups can be calculated as: $$ \left[ \hat{\theta} - z_{\alpha/2}\sqrt{\hat{\sigma}_1^2 + \hat{\sigma}_2^2}, \;\; \hat{\theta} + z_{\alpha/2}\sqrt{\hat{\sigma}_1^2 + \hat{\sigma}_2^2} \right]. $$ ```{r} tau <- 10 data(ex1_delayed_effect) ex1_delayed_effect |> rmst( var_label_tte = "month", var_label_event = "evntd", var_label_group = "trt", tau = 10, reference = "0" ) ``` The R package survRM2 [@uno2022survrm2] performs two-sample comparisons using RMST as a summary measure of the survival time distribution. Three kinds of between-group contrast metrics (i.e., the difference in RMST, the ratio of RMST and the ratio of the restricted mean time lost (RMTL)) are computed. It performs an ANCOVA-type covariate adjustment as well as unadjusted analyses for those measures. We use this R package as validation of `simtrial::rmst()`. ```{r} verify <- survRM2::rmst2( time = ex1_delayed_effect$month, status = ex1_delayed_effect$evntd, arm = ex1_delayed_effect$trt, tau = tau, alpha = 0.05 ) verify$RMST.arm1$rmst[1] - verify$RMST.arm0$rmst[1] ``` ## References