Computes the "While-Alive" estimands for recurrent events in the presence of a terminal event (death). These estimands address the challenge of defining meaningful treatment effects when death prevents further observation of recurrent events.
WA_recurrent(
formula,
data,
time = NULL,
cens.code = 0,
cause = 1,
death.code = 2,
trans = NULL,
cens.formula = NULL,
augmentR = NULL,
augmentC = NULL,
type = NULL,
marks = NULL,
...
)An object of class "WA" containing:
List of raw estimates: RMST, mean number of events, ratio of means, and their log-transformed versions with standard errors.
List of estimated treatment effects: risk difference for the mean rate
(riskDR) and optionally the augmented version (riskDRC).
The time point used for estimation.
Codes used.
Formulas used for augmentation.
The object includes influence functions (IID) for all estimators, allowing for further variance calculations or combination with other estimators.
Formula with an Event object. The first covariate on the RHS
must be a factor representing the treatment group. Can include cluster(id).
Data frame containing all variables referenced in the formula.
Time point \(t\) for estimation. If NULL, defaults to the maximum event time.
Numeric code for censoring (default 0).
Numeric code for the recurrent event of interest (default 1).
Numeric code for the terminal event/death (default 2).
Power transformation for the mean of events per time-unit (default NULL, i.e., linear).
Formula for the censoring model. Default is ~strata(treatment).
Formula for covariate augmentation in the randomization model
(e.g., ~age+sex). Improves efficiency.
Formula for covariate augmentation in the censoring model. Enables double robustness.
Type of augmentation for the binomial regression call. Default is "I"
if augmentC is given, otherwise "II".
Optional marks for composite outcome situations (e.g., distinguishing event types in a composite endpoint).
Additional arguments passed to binregATE.
Thomas Scheike
The function estimates two primary quantities:
Ratio of Means: $$E(N(\min(D,t))) / E(\min(D,t))$$ The expected number of events up to time \(t\) (censored by death \(D\)) divided by the expected time alive up to \(t\).
Mean of Events per Time Unit: $$E(N(\min(D,t)) / \min(D,t))$$ The expected rate of events per unit of time alive.
Estimation is based on Inverse Probability of Censoring Weighting (IPCW) to handle administrative censoring and death. The method can be augmented with covariates (double robust estimation) to improve efficiency and robustness.
Ragni, A., Martinussen, T., & Scheike, T. H. (2023). Nonparametric estimation of the Patient Weighted While-Alive Estimand. arXiv preprint.
Mao, L. (2023). Nonparametric inference of general while-alive estimands for recurrent events. Biometrics, 79(3), 1749–1760.
Schmidli, H., Roger, J. H., & Akacha, M. (2023). Estimands for recurrent event endpoints in the presence of a terminal event. Statistics in Biopharmaceutical Research, 15(2), 238–248.
data(hfactioncpx12)
dtable(hfactioncpx12,~status)
dd <- WA_recurrent(Event(entry,time,status)~treatment+cluster(id),data=hfactioncpx12,
time=2,death.code=2)
summary(dd)
Run the code above in your browser using DataLab