# NOT RUN {
# Survival setting
library(prodlim)
library(data.table)
library(survival)
set.seed(180)
d = SimSurv(180)
f = coxph(Surv(time,status)~X1+X2,data=d,x=TRUE)
# }
# NOT RUN {
wallyPlot(f,
time=4,
q=10,
data=d,
formula=Surv(time,status)~1)
wallyPlot(f,
time=4,
q=10,
hanging=TRUE,
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 {
# Reproduce Wally plots presented in Blanche et al. (2017)
# }
# NOT RUN {
data(threecity)
wallyPlot(threecity$pi,
time=5,
hanging=TRUE,
formula=Hist(time,status)~1,
data=threecity,
ylim=c(-.1,.25),
seed= 511,
hline.lwd=3,
mar=c(1.01, 4.1, 1.15, 2))
# }
# NOT RUN {
# }
# NOT RUN {
data(divat)
wallyPlot(divat$pi,
time=5,
hanging=TRUE,
formula=Hist(time,status)~1,
data=divat,
ylim=c(-.1,.60),
seed= 123459,
hline.lwd=3,
mar=c(1.01, 4.1, 1.15, 2))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab