Learn R Programming

mets (version 1.3.11)

WA_recurrent: While-Alive Estimands for Recurrent Events

Description

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.

Usage

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,
  ...
)

Value

An object of class "WA" containing:

RAW

List of raw estimates: RMST, mean number of events, ratio of means, and their log-transformed versions with standard errors.

ET

List of estimated treatment effects: risk difference for the mean rate (riskDR) and optionally the augmented version (riskDRC).

time

The time point used for estimation.

cause, death.code, cens.code

Codes used.

augmentR, augmentC

Formulas used for augmentation.

The object includes influence functions (IID) for all estimators, allowing for further variance calculations or combination with other estimators.

Arguments

formula

Formula with an Event object. The first covariate on the RHS must be a factor representing the treatment group. Can include cluster(id).

data

Data frame containing all variables referenced in the formula.

time

Time point \(t\) for estimation. If NULL, defaults to the maximum event time.

cens.code

Numeric code for censoring (default 0).

cause

Numeric code for the recurrent event of interest (default 1).

death.code

Numeric code for the terminal event/death (default 2).

trans

Power transformation for the mean of events per time-unit (default NULL, i.e., linear).

cens.formula

Formula for the censoring model. Default is ~strata(treatment).

augmentR

Formula for covariate augmentation in the randomization model (e.g., ~age+sex). Improves efficiency.

augmentC

Formula for covariate augmentation in the censoring model. Enables double robustness.

type

Type of augmentation for the binomial regression call. Default is "I" if augmentC is given, otherwise "II".

marks

Optional marks for composite outcome situations (e.g., distinguishing event types in a composite endpoint).

...

Additional arguments passed to binregATE.

Author

Thomas Scheike

Details

The function estimates two primary quantities:

  1. 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\).

  2. 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.

References

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.

Examples

Run this code
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