fit.cure.model: Parametric cure model

Description Usage Arguments Details Value Examples

View source: R/fit.cure.model.R

Description

This function fits parametric cure models using simple parametric distributions.

Usage

1
2
3
4
5
6
fit.cure.model(formula, data, formula.surv = NULL, type = c("mixture",
  "nmixture"), dist = c("weibull", "exponential", "lognormal", "weiwei",
  "weiexp"), link = c("logit", "loglog", "identity", "probit"),
  bhazard = NULL, covariance = TRUE, link.mix = c("logit", "loglog",
  "identity", "probit"), control = list(maxit = 10000),
  method = "Nelder-Mead", 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).

In the two last 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.

Value

An object of class cm containing the parameters of the cure model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
##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", 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)

Example output

Loading required package: survival
Loading required package: rstpm2
Loading required package: splines

Attaching package:rstpm2The following object is masked frompackage:survival:

    colon

Loading required package: date

cuRe documentation built on April 23, 2020, 5:16 p.m.

Related to fit.cure.model in cuRe...