data(dataK) # the database with the observed sample
data(fr.ratetable) # the table with the expected mortality rates
# The multivariate PH regression with a Weibull distribution
model <- sPLANN(Surv(time, event) ~ biomarker + sex + stade + delay
, data = dataK, inter = 365.241)
# the calibration plots for predictions at 2, 4, 6 and 8 years
par(mfrow=c(2, 2))
plot(model, n.groups=2, pro.time=2*365.24,
main="Predction at 2 years")
plot(model, n.groups=2, pro.time=4*365.24,
main="Predction at 4 years")
plot(model, n.groups=2, pro.time=6*365.24,
main="Predction at 6 years")
plot(model, n.groups=2, pro.time=8*365.24,
main="Predction at 8 years")
Run the code above in your browser using DataLab