# \donttest{
library("xhaz")
#Giorgi et al model: baseline excess hazard is a quadratic Bsplines
# function with two interior knots and allow here a
# linear and proportional effects for the covariates on
# baseline excess hazard.
fitphBS <- xhaz(formula = survival::Surv(time_year, status) ~ agec + race,
data = simuData,
ratetable = survival::survexp.us,
interval = c(0, NA, NA, 6),
rmap = list(age = 'age', sex = 'sex', year = 'date'),
baseline = "bsplines", pophaz = "classic")
fitphBS
BIC(fitphBS)
# }
Run the code above in your browser using DataLab