Use results from adjusted_KM() and input dataset to generate adjusted survival plot (users can also produce a figure by using ggplot2)

adjKM_plot(res, data)

Arguments

res

results from adjusted_KM()

data

the input dataset

Value

Adjusted KM plot will be shown after running this function

Examples

# Data preparation
library(KMsurv)
data(bmt)
bmt$arm <- bmt$group
bmt$arm = factor(as.character(bmt$arm), levels = c("2", "1", "3"))
bmt$z3 = as.character(bmt$z3)
bmt$t2 = bmt$t2 * 12/365.25

# Cox model
result1 = adjusted_KM(data = bmt, time = "t2", status = "d3", group = "arm", covlist = c("z1",
"z3"), stratified_cox = "No", reference_group = NULL)
adjKM_plot(result1, data = bmt)