# fit.cure.model: Parametric cure model In cuRe: Parametric Cure Model Estimation

 fit.cure.model R Documentation

## Parametric cure model

### Description

This function fits parametric cure models using simple parametric distributions.

### Usage

fit.cure.model(
formula,
data,
formula.surv = NULL,
type = c("mixture", "nmixture"),
dist = c("weibull", "exponential", "lognormal", "weiwei", "weiexp", "gmw"),
link = c("logit", "loglog", "identity", "probit"),
bhazard = NULL,
covariance = TRUE,
link.mix = c("logit", "loglog", "identity", "probit"),
control = list(maxit = 10000),
init = NULL
)


### Arguments

 formula Formula for modelling the cure proportion. The left hand side has to be of the form Surv(time, status). data Data frame in which to interpret the variable names in formula and formula.surv. formula.surv List of formulas for each parameter in the parametric distribution (see details). type A character indicating the type of cure model. Possible values are mixture (default) and nmixture. dist The parametric distribution of the survival of the uncured. link Character. Specifies the link function of the cure proportion. bhazard Background hazard. covariance Logical. If TRUE (default), the covariance matrix is computed. link.mix Character. Specifies the link function for the mixture parameter in a weibull-weibull mixture model and weibull-exponential model. Only used when dist = "weiwei" and dist = "weiexp". control List of control parameters passed to optim. method Optimization method passed to optim. init Initial values for the maximum likelihood optimization. If not provided, the optimization will start in 0.

### Details

If type = "mixture", the function fits the model,

S(t|z) = π(z) + [1 - π(z)] S_u(t|z),

and if type = "nmixture", the function fits the model,

S(t|z) = π(z)^{\widetilde F(t)},

where z is a vector of covariates. The formula.surv argument is used to model S_u(t) (1 - \widetilde F(t)). It is a list of formulas with as many entries as there are parameters in the chosen parametric distribution. If not specified, all formulas are assumed to be ~1. The ith formula, i.e., formula.surv[[i]] refers to θ_i in the below survival functions.

Exponential model:

S_u(t) = \exp≤ft(-t θ_1\right).

Weibull model:

S_u(t) = \exp≤ft(-θ_1 t^{θ_2}\right).

Log-normal model:

S_u(t) = 1 - Φ≤ft(\frac{\log(t) - θ_1}{θ_2}\right).

Weibull-exponential mixture model:

S_u(t) = θ_1\exp≤ft(-θ_2 t^{θ_3}\right) + (1 - θ_1)\exp≤ft(-θ_4 t\right).

Weibull-Weibull mixture model:

S_u(t) = θ_1\exp≤ft(-θ_2 t^{θ_3}\right) + (1 - θ_1)\exp≤ft(-θ_4 t^{θ_5}\right).

Generalized modified Weibull distribution:

S_u(t) = 1-≤ft(1 - \exp≤ft(-θ_1 t ^ θ_2 \exp(θ_3 t)\right)\right) ^ θ_4.

In the Weibull-exponential and Weibull-Weibull mixture models, the link function for the mixture component is controlled by link.mix. The remaining parameters are modelled using an exponential link function except θ_1 in the log-normal model, which is modelled using the identity. Parameters are not transformed back to the original scale in the outputted object and related print.cm and summary.cm functions

### Value

An object of class cm containing the estimated parameters of the cure model. The appropriate link functions taken on π and the θ_i's are linear in the covariates corresponding to their respective parameter estimates.

### Examples

##Use data cleaned version of the colon cancer data from the rstpm2 package
data("colonDC")
set.seed(2)
colonDC <- colonDC[sample(1:nrow(colonDC), 500), ]

##Extract general population hazards
colonDC\$bhaz <- general.haz(time = "FU", rmap = list(age = "agedays", sex = "sex", year= "dx"),
data = colonDC, ratetable = survexp.dk)

###Without covariates
##Fit weibull mixture cure model
fit.wei <- fit.cure.model(Surv(FUyear, status) ~ 1, data = colonDC, bhazard = "bhaz",
type = "mixture", dist = "weibull", link = "logit")

##Plot various summaries of the model (see ?predict.cm)
plot(fit.wei)
plot(fit.wei, time = seq(0, 40, length.out = 100))
plot(fit.wei, type = "hazard")
plot(fit.wei, type = "survuncured")
plot(fit.wei, type = "probcure")

#Fit a weibull-weibull mixture cure model
fit.weiwei <- fit.cure.model(Surv(FUyear, status) ~ 1, data = colonDC, bhazard = "bhaz",
type = "mixture", dist = "weiwei", link = "logit")

#Compare to the weibull model
plot(fit.wei, ci = FALSE)
plot(fit.weiwei, add = TRUE, col = 2, ci = FALSE)

###With covariates
##Fit weibull mixture cure model with age effect for both components of the Weibull model
fit <- fit.cure.model(Surv(FUyear, status) ~ age, data = colonDC, bhazard = "bhaz",
formula.surv = list(~ age, ~ age),
type = "mixture", dist = "weibull", link = "logit")

##Plot model for age 50 and 60
plot(fit, newdata = data.frame(age = 60),
time = seq(0, 15, length.out = 100), ci = FALSE)
plot(fit, newdata = data.frame(age = 50),
time = seq(0, 15, length.out = 100), ci = FALSE, add = TRUE, col = 2)

plot(fit, newdata = data.frame(age = 60),
time = seq(0, 15, length.out = 100), ci = FALSE, type = "hazard")
plot(fit, newdata = data.frame(age = 50),
time = seq(0, 15, length.out = 100), ci = FALSE, type = "hazard", add = TRUE, col = 2)


cuRe documentation built on May 17, 2022, 1:05 a.m.