# NOT RUN {
if (requireNamespace("splines", quietly = TRUE)) {
library(splines)
data("simdat")
mod_cb <- casebase::fitSmoothHazard(status ~ trt + ns(log(eventtime),
df = 3) +
trt:ns(log(eventtime),df=1),
time = "eventtime",
data = simdat,
ratio = 1)
}
# }
Run the code above in your browser using DataLab