require(survival)
leukemia.surv <- survival::survfit(survival::Surv(time, status) ~ x, data = survival::aml)
qkmplot(leukemia.surv, conf_int = TRUE)
qkmplot_bulid_data_frame(leukemia.surv)
qrmst(leukemia.surv) # NaN for rmst.se in Nonmaintained strata as last observation is an event
qrmst(leukemia.surv, 44)
# pbc examples
pbc_fit <-
survival::survfit(
formula = survival::Surv(time, status > 0) ~ trt
, data = pbc
, subset = !is.na(trt)
)
qkmplot(pbc_fit)
qkmplot(pbc_fit, conf_int = TRUE)
qrmst(pbc_fit)
qrmst(pbc_fit)
Run the code above in your browser using DataLab