rmst_point_estimate {bunsen}R Documentation

Calculate the point estimate of the marginal restricted mean survival time (RMST) when adjusting covariates in clinical trials

Description

Estimate the marginal RMST (point estimate) using the Karrison et al.(2018).

Usage

rmst_point_estimate(fit, dt, tau)

Arguments

fit

A coxph object with strata(trt) in the model. See example.

dt

A data frame used for the fit - coxph model including survival time, OS status, trt, and covariates.

tau

Numeric. A value for the restricted time or the pre-specified cutoff time point.

Details

Restricted mean survival time is a measure of average survival time up to a specified time point. We adopted the methods from Karrison et al.(2018) for estimating the marginal RMST when adjusting covariates.

Value

A list containing the RMST, cumulative survival function, and cumulative hazard function.

output

Marginal RMST

surv0

Cumulative survival function for the placebo group

cumhaz0

Cumulative hazard function for the placebo group

surv1

Cumulative survival function for the treatment group

cumhaz1

Cumulative hazard function for the treatment group

References

Examples

library(survival)
data("oak")

tau <- 26
time <- oak$OS
status <- oak$os.status
trt <- oak$trt
covariates <- oak[, c("btmb", "pdl1")]
dt <- as.data.frame(cbind(time, status, trt, covariates))
fit <- coxph(Surv(time, status) ~ btmb + pdl1 + strata(trt), data = dt)
delta <- rmst_point_estimate(fit, dt = dt, tau)
delta$output

[Package bunsen version 0.1.0 Index]