data(dataDIVAT2)
# The estimation of the hyperparameters on the first 150 patients
tune.model <- tunePHspline(times="times", failures="failures", data=dataDIVAT2[1:150,],
cov.quanti=c("age"), cov.quali=c("hla", "retransplant", "ecd"),
cv=3, k=1:2, seed=42)
# the estimated nodesize value
tune.model$optimal
tune.model$results
Run the code above in your browser using DataLab