Cure models for analyzing survival data with a cured fraction of long-term survivors. Implements mixture cure models and non-mixture cure models for oncology research.
Usage
curemodels(
  data,
  time,
  status,
  predictors,
  model_type = "mixture",
  cure_link = "logit",
  survival_dist = "weibull",
  bootstrap_ci = FALSE,
  n_bootstrap = 1000,
  cure_threshold = 60,
  plot_cure_fraction = TRUE,
  plot_survival = TRUE,
  goodness_of_fit = TRUE,
  sensitivity_analysis = FALSE
)Arguments
- data
- The data as a data frame. 
- time
- Follow-up time variable 
- status
- Event status variable 
- predictors
- Predictor variables for the model 
- model_type
- Type of cure model: mixture, non-mixture, or both 
- cure_link
- Link function for the cure probability model 
- survival_dist
- Distribution for modeling survival of uncured patients 
- bootstrap_ci
- Use bootstrap for confidence interval estimation 
- n_bootstrap
- Number of bootstrap samples 
- cure_threshold
- Time threshold for defining cured patients 
- plot_cure_fraction
- Generate cure fraction plot 
- plot_survival
- Generate survival curve plots 
- goodness_of_fit
- Conduct goodness of fit assessment 
- sensitivity_analysis
- Conduct sensitivity analysis 
Value
A results object containing:
| results$todo | a html | ||||
| results$warnings | a html | ||||
| results$summary | a html | ||||
| results$modelTable | a table | ||||
| results$cureTable | a table | ||||
| results$cureFractionPlot | an image | ||||
| results$survivalPlot | an image | ||||
| results$goodnessOfFit | a table | ||||
| results$sensitivityAnalysis | a html | ||||
| results$modelComparison | a table | ||||
| results$interpretation | a html | 
Tables can be converted to data frames with asDF or as.data.frame. For example:
results$modelTable$asDF
as.data.frame(results$modelTable)
Examples
# \donttest{
# Example usage
curemodels(
    data = cancer_data,
    time = followup_time,
    status = death_status,
    predictors = c(age, stage, treatment),
    model_type = "mixture"
)
# }