Learn R Programming

tipse (version 1.2)

average_km: Average Kaplan-Meier Curves Across Multiple Imputed Datasets

Description

Takes a list of multiply imputed datasets corresponding to a single tipping point parameter and pools the Kaplan-Meier survival curves for a given treatment arm. Uses log(-log) transformation and Rubin's rules for pooling across imputations.

Usage

average_km(km_data, arm, conf_level = 0.95)

Value

A data frame with the following columns:

time

Time points of the KM curve.

survival_comb

Pooled survival probability at each time point.

survival_lcl_comb

Lower 95% confidence limit of pooled survival.

survival_ucl_comb

Upper 95% confidence limit of pooled survival.

stderr

Standard error of the pooled log-log transformed estimate.

Arguments

km_data

List of data frames, each containing one multiply imputed dataset for a tipping point. Each data frame must contain columns AVAL, EVENT, TRT01P, iter, and a tipping point parameter depending on the method.

arm

Character string specifying the treatment arm to pool (must match TRT01P levels).

conf_level

Numeric. Confidence level for CIs (default = 0.95).