Description Usage Arguments Details Value Examples
View source: R/calc.Crude.quantile.R
The following function estimates the time to statistical cure using the conditional probability of diseaserelated death.
1 2 3  calc.Crude.quantile(fit, q = 0.05, newdata = NULL, max.time = 20,
exp.fun = NULL, var.type = c("ci", "se", "n"), rmap,
ratetable = survexp.dk, tau = 100, reverse = TRUE, 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, 
exp.fun 
Object of class 
var.type 
Character. Possible values are " 
rmap 
List to be passed to 
ratetable 
Object of class 
tau 
Upper bound of integral (see ?calc.Crude). Default is 100. 
reverse 
Logical passed on to 
scale 
Numeric. Passed to the 
The cure point is calculated as the time point at which the conditional probability of diseaserelated
death reaches the threshold, q
. If q
is not reached within max.time
, no solution is reported.
The estimated cure point.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  ##Use data cleaned version of the colon cancer data from the rstpm2 package
data("colonDC")
##Extract general population hazards
colonDC$bhaz < general.haz(time = "FU", 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 = T)
cp < calc.Crude.quantile(fit, q = 0.05,
rmap = list(age = agedays, sex = sex, year = dx))
#Compare the result with the trajectory of the conditional probability of diseaserelated death
res < calc.Crude(fit, type = "condother", time = seq(0, 20, length.out = 100),
var.type = "n",
rmap = list(age = agedays, sex = sex, year = dx), reverse = T)
plot(res)
abline(h = 0.05, v = cp$Estimate)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.