--- title: "Analysis of composite endpoints of recurrent event and death by the restricted mean time in favor of treatment" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Analysis of composite endpoints of recurrent event and death by the restricted mean time in favor of treatment} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} \usepackage{amsmath} --- ```{r, echo = FALSE, message = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## INTRODUCTION This vignette demonstrates the use of the R-package `rmt` for the restricted-mean-time-in-favor-of-treatment approach to the analysis of composite outcomes consisting of recurrent event and death. ### Data type Let $N(t)$ denote the counting process for the recurrent event, e.g., repeated hospitalizations, and let $N_D(t)$ denote that for death. The composite outcome process is defined by $$Y(t)=N(t)+\infty N_D(t).$$ That is, $Y(t)$ counts the number of non-fatal event on the living patient and jumps to $\infty$ when the patient dies. Traditional ways of combining the components include: 1. Time to the first event: $Y^*(t)=I\{N(t)+N_D(t)>0\}$; 1. Weighted composite event process (Mao and Lin, 2016): $Y^{**}(t)=N(t)+w_DN_D(t)$ for some $w_D\geq 1$; Compared to these approaches, $Y(t)$ has the advantage of including all events while prioritizing death in a natural, hierarchical way. ### Effect size estimand Let $Y^{(a)}$ denote the outcome process from group $a$ ($a=1$ for the treatment and $a=0$ for the control). The estimand of interest is constructed under a generalized pairwise comparison framework (Buyse, 2010). With $Y^{(1)}\perp Y^{(0)}$, let $$\mu(\tau)=E\int_0^\tau I\{Y^{(1)}(t)< Y^{(0)}(t)\}{\rm d}t - E\int_0^\tau I\{Y^{(1)}(t)> Y^{(0)}(t)\}{\rm d}t,$$ for some pre-specified follow-up time $\tau$. We call $\mu(\tau)$ the **restricted mean time (RMT) in favor of treatment** and interpret it as the *average time gained by the treatment in a more favorable condition*. It generalizes the familiar restricted mean survival time to account for the non-fatal events. In fact, it can be shown that $\mu(\tau)$ reduces to the net restricted mean survival time (Royston & Parmar, 2011) if $N(t)\equiv 0$. For details of the methodology, refer to Mao (2021). The overall effect size admits a component-wise decomposition: $$\mu(\tau)=\mu_D(\tau)+\mu_H(\tau),$$ where \begin{equation}\tag{*} \mu_D(\tau)=E\int_0^\tau I\{Y^{(1)}(t)<\infty, Y^{(0)}(t)=\infty\}{\rm d} t- E\int_0^\tau I\{Y^{(0)}(t)<\infty, Y^{(0)}(t)=\infty\}{\rm d} t \end{equation} is equivalent to the standard net restricted mean survival time and $$\mu_H(\tau)=E\int_0^\tau I\{Y^{(1)}(t)< Y^{(0)}(t)<\infty\}{\rm d}t - E\int_0^\tau I\{Y^{(0)}(t)< Y^{(1)}(t)<\infty\}{\rm d}t$$ is the average time gained by the treatment with fewer non-fatal events among the living patients. The second component can be further decomposed by $\mu_H(\tau)=\sum_{k=1}^K\mu_k(\tau)$, where \begin{equation}\tag{**} \mu_k(\tau)=E\int_0^\tau I\{Y^{(1)}(t)