# \donttest{
# load the data set in the package
library("xhaz")
library("survexp.fr")
data("dataCancer", package = "xhaz") # load the data set in the package
fit.nphBS <- 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")
plot(fit.nphBS, cov = "immuno_trt", col = "blue", baseline = FALSE)
# }
Run the code above in your browser using DataLab