# \donttest{
library("xhaz")
library("numDeriv")
library("survexp.fr")
library("splines")
fit.tdphBS <- xhaz(
formula = Surv(obs_time_year, event) ~ ageCentre + qbs(immuno_trt),
data = dataCancer, ratetable = survexp.fr,
interval = c(0, NA, NA, max(dataCancer$obs_time_year)),
rmap = list(age = 'age', sex = 'sexx', year = 'year_date'),
baseline = "bsplines", pophaz = "classic")
print(fit.tdphBS)
# }
Run the code above in your browser using DataLab