# \donttest{
library("curesurv")
library("survival")
testiscancer$age_crmin <- (testiscancer$age - min(testiscancer$age)) / sd(testiscancer$age)
fit_m0 <- curesurv(Surv(time_obs, event) ~ 1 | 1,
pophaz = "ehazard",
cumpophaz = "cumehazard",
model = "nmixture", dist = "tneh",
link_tau = "linear",
data = testiscancer,
method_opt = "L-BFGS-B")
fit_m1 <- curesurv(Surv(time_obs, event) ~ age_crmin | 1,
pophaz = "ehazard",
cumpophaz = "cumehazard",
model = "nmixture", dist = "tneh",
link_tau = "linear",
data = testiscancer,
method_opt = "L-BFGS-B")
anova(fit_m0, fit_m1)
# }
Run the code above in your browser using DataLab