fit.fun.cure: Fit multiple mixture cure models on survival data

View source: R/survival_functions.R

fit.fun.cureR Documentation

Fit multiple mixture cure models on survival data

Description

fit.fun.cure fits multiple mixture cure models to survival data using flexsurv.

Usage

fit.fun.cure(
  time,
  status,
  covariate = F,
  rx = "rx",
  data = data,
  extrapolate = FALSE,
  times,
  legend_position = "bottom",
  xlow = min(times),
  xhigh = max(times),
  ylow = 0,
  yhigh = 1,
  risktable = F,
  mods = c("exp", "weibull", "gamma", "lnorm", "llogis", "gompertz", "gengamma")
)

Arguments

time

numeric vector of time to estimate probabilities.

status

numeric vector of event status.

covariate

logical value indicating whether treatment is being used as a covariate in parameteric survival models. Default = FALSE.

rx

numerical value indicating the treatment variable used as as covariate in parameteric survival models.

data

dataframe containing the time and status variables.

extrapolate

extrapolate beyond model time horizon. Default = FALSE.

times

time horizon the extrapolation is done over.

legend_position

position of the legend. Default = "top".

xlow

time horizon the extrapolation is done over. Default = min(time).

xhigh

time horizon the extrapolation is done over. Default = max(time).

ylow

time horizon the extrapolation is done over. Default = 0.

yhigh

time horizon the extrapolation is done over. Default = 1.

risktable

time horizon the extrapolation is done over. Default = F.

mods

a vector of models to fit. Default = c("exp", "weibull", "gamma", "lnorm", "llogis", "gompertz", "gengamma").

Value

a list containing all survival model objects.


DARTH-git/darthtools documentation built on April 3, 2025, 2:12 p.m.