# Example on phase III clinical trial e1684 on melanoma data
data(ecog1684)
# Kaplan-Meier curve
plot(survfit(Surv(time, status) ~ 1, data = ecog1684), mark.time = TRUE)
fit <- curelps(Surv(time, status) ~ lt(age + trt + sex) +
st(age + trt + sex), data = ecog1684, K = 20, penorder = 2)
fit
profile1 <- c(0, 1, 1, 0, 1, 1) # Mean age, trt = IFN, sex = Female.
profile2 <- c(0, 0, 1, 0, 0, 1) # Mean age, trt = control, sex = Female.
opar <- par(no.readonly = TRUE)
par(mfrow = c(1, 2))
plot(fit, curvetype = "probacure", plot.cred = TRUE, ylim = c(0,1),
covar.profile = profile1, cred.int = 0.90,
main = "Mean age, trt = IFN, sex = Female", cex.main = 0.8,
show.legend = FALSE)
plot(fit, curvetype = "probacure", plot.cred = TRUE, ylim = c(0,1),
covar.profile = profile2, cred.int = 0.90,
main = "Mean age, trt = control, sex = Female", cex.main = 0.8,
show.legend = FALSE)
par(opar)
Run the code above in your browser using DataLab