# NOT RUN {
# Survival setting
library(prodlim)
library(survival)
set.seed(180)
d = SimSurv(180)
f = coxph(Surv(time,status)~X1+X2,data=d)
# }
# NOT RUN {
wallyPlot(f,
time=4,
q=10,
type="risk",
data=d,
formula=Surv(time,status)~1)
wallyPlot(f,
time=4,
q=10,
hanging=TRUE,
type="survival",
data=d,
formula=Surv(time,status)~1)
# }
# NOT RUN {
# Competing risks setting
library(prodlim)
library(survival)
library(riskRegression)
set.seed(180)
d2 = SimCompRisk(180)
f2 = CSC(Hist(time,event)~X1+X2,data=d2)
# }
# NOT RUN {
wallyPlot(f2,
time=5,
q=3,
hanging=TRUE,
data=d2,
formula=Hist(time,event)~1)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab