View source: R/calc.LL.quantile.R
calc.LL.quantile  R Documentation 
The following function estimates the time to statistical cure using the loss of lifetime function.
calc.LL.quantile( fit, q = 1, newdata = NULL, max.time = 20, var.type = c("ci", "n"), exp.fun = NULL, rmap = NULL, ratetable = cuRe::survexp.dk, tau = 100, type = "ll", scale = ayear )
fit 
Fitted model to do predictions from. Possible classes are

q 
Threshold to estimate statistical cure according to. 
newdata 
Data frame from which to compute predictions. If empty, predictions are made on the the data which the model was fitted on. 
max.time 
Upper boundary of the interval [0, 
var.type 
Character. Possible values are " 
exp.fun 
Object of class 
rmap 
List to be passed to 
ratetable 
Object of class 
tau 
Upper bound of integral (see ?calc.LL). Default is 100. 
type 
Type of life expectancy measure. Possible values are 
scale 
Numeric. Passed to the 
The estimated cure point.
##Use data cleaned version of the colon cancer data from the rstpm2 package data("colonDC") set.seed(2) colonDC < colonDC[sample(1:nrow(colonDC), 1000), ] ##Extract general population hazards colonDC$bhaz < general.haz(time = "FU", rmap = list(age = "agedays", sex = "sex", year= "dx"), data = colonDC, ratetable = survexp.dk) #Fit cure model and estimate cure point fit < rstpm2::stpm2(Surv(FUyear, status) ~ 1, data = colonDC, df = 6, bhazard = colonDC$bhaz, cure = TRUE) calc.LL.quantile(fit, q = 1, rmap = list(age = agedays, sex = sex, year = dx))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.