Learn R Programming

bunsen (version 0.1.1)

rmst_unadjust: Calculate the unadjusted restricted mean survival time (RMST)

Description

Estimate the unadjusted RMST (point estimate).

Usage

rmst_unadjust(time, status, trt, tau)

Value

A data frame including the survival time for each trt and the difference. SE were also calculated.

mu0

Mean survival time for trt0

se0

SE of mu0

mu1

Mean survival time for trt1

se1

SE of mu1

delta

Difference between mu0 and mu1

se_d

SE of delta

Arguments

time

A vector containing the event time of the sample.

status

A vector containing the survival status of the sample.

trt

A vector indicating the treatment assignment. 1 for treatment group. 0 for placebo group.

tau

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

Examples

Run this code

data("oak")
tau <- 26
time <- oak$OS
status <- oak$os.status
trt <- oak$trt
covariates <- oak[, c("btmb", "pdl1")]
results <- rmst_unadjust(time, status, trt, tau)

Run the code above in your browser using DataLab