Title: | Mixture and Non Mixture Parametric Cure Models to Estimate Cure Indicators |
---|---|
Description: | Fits a variety of cure models using excess hazard modeling methodology such as the mixture model proposed by Phillips et al. (2002) <doi:10.1002/sim.1101> The Weibull distribution is used to represent the survival function of the uncured patients; Fits also non-mixture cure model such as the time-to-null excess hazard model proposed by Boussari et al. (2020) <doi:10.1111/biom.13361>. |
Authors: | Juste Goungounga [aut, cre] , Judith Breaud [aut] , Olayide Boussari [aut] , Valerie Jooste [aut] |
Maintainer: | Juste Goungounga <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.1 |
Built: | 2024-11-17 05:11:26 UTC |
Source: | https://github.com/cran/curesurv |
Calculates the Akaike's "An Information Criterion" for fitted models from curesurv
## S3 method for class 'curesurv' AIC(object, ..., k = 2)
## S3 method for class 'curesurv' AIC(object, ..., k = 2)
object |
a fitted model object obtained from |
... |
optionally more fitted model objects obtained from |
k |
numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC. |
When comparing models fitted by maximum likelihood to the same data, the smaller the AIC, the better the fit.
However in our case, one should be careful when comparing the AIC. Specifically, when one implements a mixture cure model with curesurv
without correcting the rate table (pophaz.alpha=FALSE
), one is not obligated to specify cumpophaz
. However, you cannot compare a model where cumpophaz
is not specified with a model where cumpophaz
is specified. If one wants to compare different models using AIC, one should always specify cumpophaz
when
using the curesurv
function.
the value corresponds to the AIC calculated from the log-likelihood of the fitted model if just one object is provided. If multiple objects are provided, a data.frame with columns corresponding to the objects and row representing the AIC
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") AIC(fit_m1_ad_tneh)
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") AIC(fit_m1_ad_tneh)
This function computes an analysis of deviance table for two excess hazard models fitted using the curesurv R package.
## S3 method for class 'curesurv' anova(object, ..., test = "LRT")
## S3 method for class 'curesurv' anova(object, ..., test = "LRT")
object |
An object of class curesurv. |
... |
Additional object of class curesurv. |
test |
A character string. Computes the likelihood-ratio test for value |
An object of class anova inheriting from class matrix. The different columns contain respectively the degrees of freedom and the log-likelihood values of the two nested models, the degree of freedom of the chi-square statistic, the chi-square statistic, and the p-value of the likelihood ratio test.
The comparison between two or more models by anova or more excess hazard models will only be valid if they are fitted to the same dataset, and if the compared models are nested. This may be a problem if there are missing values.
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age - min(testiscancer$age)) / sd(testiscancer$age) fit_m0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1 <- curesurv(Surv(time_obs, event) ~ age_crmin | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") anova(fit_m0, fit_m1)
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age - min(testiscancer$age)) / sd(testiscancer$age) fit_m0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1 <- curesurv(Surv(time_obs, event) ~ age_crmin | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") anova(fit_m0, fit_m1)
returns the cumulative excess hazard for an TNEH model in case of parametrization of log the of the time to null excess hazard as function to fit the data
cumLexc_mul(z_tau, z_alpha, x, theta)
cumLexc_mul(z_tau, z_alpha, x, theta)
z_tau |
covariates depending on tau |
z_alpha |
covariates depending on alpha |
x |
time value |
theta |
of the coefficient of tneh parameters |
An object of class numeric containing the cumulative excess hazard with the same length as the time.
Fits the non-mixture cure model proposed by Boussari et al. (2020), or mixture cure model such as proposed by De Angelis et al. (1999) with the possibility to correct the background mortality as proposed by Phillips et al. (2002) in the net survival framework.
This model allows for direct estimation of time-to-null-excess-hazard which can be interpreted as time-to-cure.
The parametrization offers various link functions for the covariates effects on the time-to-null-excess-hazard:
τ(zk) = g(τ0 + zk τk).
If link_tau=linear
, then g is the identity function. If link_tau=loglinear
then g is the exponential function.
In this model, the cure proportion is expressed as:
π(z;θ) = exp(−g(τ0 + zk τk) \text{Beta}((\alpha_{0} + Z_{k} \alpha_{k}), \beta)).
The user can choose the survival function modeling the uncured patients net survival among Weibull (default) and exponentiated Weibull. The parametrization for weibull distribution is Su(t) = exp(−λtγ)exp(δZ). The related hazard function is expressed as: λu(t) = γλtγ− 1 exp(δz) The net survival and the excess hazard functions can be respectively expressed as SE(t) = π(z;β) + (1 − π(z;β)) * Su(t). and λE(t)=[((1−π(z;β))fu(t))/(π(z;β) + (1 − π(z;β))Su(t))], with π(z;β) = [1/((1 + exp(−[β0 + Zβ])))].
Usually, in the net survival framework the expected hazard is directly obtained from life tables. However some patients in cancer registries can have some factors impacting their expected mortality rates (such as comorbidities, deprivation) that are not always accounted #' for in the available life tables, and there is a need to account for this problem. The correction proposed by Phillips et al (2002) assumes that λexp(t,z)=αλpop(t,zk) with λexp(t,z) the patient expected hazard and λpop(t,zk) the population hazard obtained from life table.
curesurv( formula, data, pophaz = NULL, cumpophaz = NULL, pophaz.alpha = FALSE, model = "nmixture", dist = "weib", link_tau = "linear", ncoor_des = NULL, init = NULL, maxit_opt = 10000, gradient = FALSE, hessian_varcov = TRUE, optim_func = "optim", optimizer = "optim", method_opt = "L-BFGS-B", trace = 0, nvalues = 10, iter_eps = 1e-08, optim_fixed = NULL, clustertype = NULL, nproc = 1, subset, na.action, sign_delta, ... )
curesurv( formula, data, pophaz = NULL, cumpophaz = NULL, pophaz.alpha = FALSE, model = "nmixture", dist = "weib", link_tau = "linear", ncoor_des = NULL, init = NULL, maxit_opt = 10000, gradient = FALSE, hessian_varcov = TRUE, optim_func = "optim", optimizer = "optim", method_opt = "L-BFGS-B", trace = 0, nvalues = 10, iter_eps = 1e-08, optim_fixed = NULL, clustertype = NULL, nproc = 1, subset, na.action, sign_delta, ... )
formula |
a formula object of the |
data |
a data frame in which to interpret the variables named in the formula |
pophaz |
corresponds to the name of the column in the data representing
the values of the population instantaneous mortality rates. If the
|
cumpophaz |
corresponds to the name of the column in the data
representing the values of the instantaneous population cumulative mortality
rates. If not specified, the model cannot be compared with model with
|
pophaz.alpha |
to be specified if user want an excess hazard model with correction of mortality rates by a scale parameter |
model |
To fit a mixture model, specify |
dist |
For mixture model, it corresponds to the function used to fit
the uncured patients survival. By default, |
link_tau |
must be specified only for |
ncoor_des |
if null, the initial parameters are defaults. If else, the initials parameters are obtained via coordinates descent algorithms |
init |
a list containing the vector of initial values |
maxit_opt |
option for maximum of iteration in optimization function |
gradient |
True if optimization process requires gradient to be provided |
hessian_varcov |
TRUE if user wants variance covariance matrix using hessian function |
optim_func |
specify which function to be used for optimization purposes. |
optimizer |
only use this argument when |
method_opt |
optimization method used in |
trace |
Non-negative integer corresponding to the |
nvalues |
number of set of initial values when using multiple initials values |
iter_eps |
this parameter only works when |
optim_fixed |
to specify with parameter to not estimated in the estimation process |
clustertype |
related to cluster type in |
nproc |
number of processors for parallel computing as in |
subset |
an expression indicating which subset of the data should be used in the modeling. All observations are included by default |
na.action |
as in the coxph function, a missing-data filter function. |
sign_delta |
only used for mixture cure rate models to specify if the effects or minus the effects of covariates acting on uncured survival to be considered. Default will be sign_delta = "1". The alternative is sign_delta = "-1". |
... |
additional parameters such |
An object of class curesurv
.
This object is a list containing the following components:
iter_coords |
number of iterations performed to obtain initial values of the parameters in tneh model only |
coefficients |
estimates found for the model |
estimates |
estimates in the appropriate scale for the model |
loglik |
corresponds to the log-likelihood computed; if only the pophaz is provided, the log-likelihood doesn't correspond to the total log-likelihood. The part of the cumulative population hazard is a constant and is dropped for the computation as presented in Esteve et al. (1990); The total log-likekihood is calculed if the user specifies a column name equal expected cumulative mortality (cumpophaz) |
iteractions |
the number iterations attained to estimate the parameters of the related model |
evaluations |
the number of times the log-likelihood function was evaluated until to reach the convergence |
convergence |
an integer code as in optim when |
message |
a character string returned by the optimizer |
varcov |
the variance covariance matrix of the parameters estimated |
varcov_star |
the variance covariance matrix of the coefficients of the model of interest |
std_err |
the standard errors of the estimated parameters |
std_err_star |
the standard errors of the coefficients of the model of interest |
AIC |
the Akaike information criteria from the model of interest |
n.events |
the number of events in the dataset. Events are considered |
n.obs |
the number of observations in the dataset. |
model |
if fitted model is a mixture model, it returns "mixture". If fitted model is Time-To-Null Excess Hazard model, it returns "nmixture". |
Terms |
the representation of the terms in the model |
pophaz.alpha |
logical value to indicate if fitted cure model requires correction of mortality rates by a scale parameter |
pophaz |
corresponds to the the population instantaneous mortality rates. |
cumpophaz |
corresponds to the population cumulative mortality rates. |
frailtyhp |
a booleen to be specified if a frailty correction is needed for the population hazard. |
dist |
For mixture model, it corresponds to the function used to fit the uncured patients survival. By default, ("weib") is used. Another option is the exponentiated Weibull function ("eweib"). For non-mixture models, this argument corresponds to the name of the model. By default, ("tneh") is used to fit the time to null excess hazard model proposed by Boussari et al. |
xmax |
maximum follow-up time to evaluate the TTC |
z_tau |
Covariates acting on parameter tau in non mixture cure model tneh |
link_tau |
returned only for model ="tneh"; returned by default is "linear" or "loglinear" for linear or loglinear link function of covariates acting on tau parameter. |
z_alpha |
Covariates acting on parameter alpha in non mixture cure model tneh |
z_c |
Covariates acting on cure fraction in mixture cure model |
z_ucured |
covariates acting on survival of uncured in mixture cure model |
z_pcured |
Covariates acting on cure fraction in mixture cure model |
z_ucured |
covariates acting on survival of uncured in mixture cure model |
data |
the dataset used to run the model |
call |
the function call based on model |
formula |
the formula as a formula object |
Note that all these models can be fitted in the overall survival setting.
time
is OBLIGATORY in years
Juste Goungounga, Judith Breaud, Olayide Boussari, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2021 Dec;77(4):1289-1302. doi: 10.1111/biom.13361. Epub 2020 Sep 12. PMID: 32869288. (pubmed)
Boussari O, Romain G, Remontet L, Bossard N, Mounier M, Bouvier AM, Binquet C, Colonna M, Jooste V. A new approach to estimate time-to-cure from cancer registries data. Cancer Epidemiol. 2018 Apr;53:72-80. doi: 10.1016/j.canep.2018.01.013. Epub 2018 Feb 4. PMID: 29414635. (pubmed)
Phillips N, Coldman A, McBride ML. Estimating cancer prevalence using mixture models for cancer survival. Stat Med. 2002 May 15;21(9):1257-70. doi: 10.1002/sim.1101. PMID: 12111877. (pubmed)
De Angelis R, Capocaccia R, Hakulinen T, Soderman B, Verdecchia A. Mixture models for cancer survival analysis: application to population-based data with covariates. Stat Med. 1999 Feb 28;18(4):441-54. doi: 10.1002/(sici)1097-0258(19990228)18:4<441::aid-sim23>3.0.co;2-m. PMID: 10070685. (pubmed)
Botta L, Caffo O, Dreassi E, Pizzoli S, Quaglio F, Rugge M, Valsecchi MG. A new cure model that corrects for increased risk of non-cancer death: analysis of reliability and robustness, and application to real-life data. BMC Med Res Methodol. 2023 Mar 25;23(1):70. doi: 10.1186/s12874-023-01876-x. PMID: N/A. (pubmed)
predict.curesurv()
, print.curesurv()
, browseVignettes("curesurv")
library("curesurv") library("survival") # Net survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate theta_init2 <- rep(0, 3) theta_lower2 <- c(-Inf,-Inf,-Inf) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_ml <- curesurv(Surv(time_obs, event) ~ 1 | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", dist = "weib", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_ml # Mixture cure model with Weibull function for the uncured patients survival: #standardized age as covariate fit_m2_ml <- curesurv(Surv(time_obs, event) ~ age_cr | age_cr, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") fit_m2_ml ## Non mixture cure model ### TNEH Null model #### loglinear effect of covariates on time-to-null excess hazard theta_init2 <- rep(0, 3) theta_lower2 <- c(-Inf,-Inf,-Inf) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_mult_tneh <- curesurv(Surv(time_obs, event) ~ 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "loglinear", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_mult_tneh #### Additive parametrization theta_init2 <- c(1, 6, 6) theta_lower2 <- c(0,1,0) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_ad_tneh <- curesurv(Surv(time_obs, event) ~ 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_ad_tneh #### Additive parametrization, with covariates fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_alpha(age_cr) + z_tau(age_cr), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh
library("curesurv") library("survival") # Net survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate theta_init2 <- rep(0, 3) theta_lower2 <- c(-Inf,-Inf,-Inf) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_ml <- curesurv(Surv(time_obs, event) ~ 1 | 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", dist = "weib", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_ml # Mixture cure model with Weibull function for the uncured patients survival: #standardized age as covariate fit_m2_ml <- curesurv(Surv(time_obs, event) ~ age_cr | age_cr, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") fit_m2_ml ## Non mixture cure model ### TNEH Null model #### loglinear effect of covariates on time-to-null excess hazard theta_init2 <- rep(0, 3) theta_lower2 <- c(-Inf,-Inf,-Inf) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_mult_tneh <- curesurv(Surv(time_obs, event) ~ 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "loglinear", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_mult_tneh #### Additive parametrization theta_init2 <- c(1, 6, 6) theta_lower2 <- c(0,1,0) theta_upper2 <- c(Inf, Inf, Inf) fit_m0_ad_tneh <- curesurv(Surv(time_obs, event) ~ 1, pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, init = list(theta_init = theta_init2, theta_lower = theta_lower2, theta_upper = theta_upper2), method_opt = "L-BFGS-B") fit_m0_ad_tneh #### Additive parametrization, with covariates fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_alpha(age_cr) + z_tau(age_cr), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh
Simulated data
data(dataweib)
data(dataweib)
This dataset contains the following variables:
Age at diagnosis
centered and scaled age at diagnosis
"<45", "45_59" and ">=60" age groups
"male", "female" gender groups
"<0", "1" , "2" and "3" for stage I-IV groups
Follow-up time (years)
Vital status
individual cumulative expected hazard
individual instantaneous expected hazard
data(dataweib) summary(dataweib)
data(dataweib) summary(dataweib)
Simulated data
data(pancreas_data)
data(pancreas_data)
This dataset contains the following variables:
Age at diagnosis
centered and scaled age at diagnosis
"<45", "45_59" and ">=60" age groups
Follow-up time (years)
Vital status
individual cumulative expected hazard
individual instantaneous expected hazard
data(pancreas_data) summary(pancreas_data)
data(pancreas_data) summary(pancreas_data)
Produces figures of (excess) hazard, (net) survival and probability P(t) of being cured at a given time t after diagnosis knowing that he/she was alive up to time t.
## S3 method for class 'predCuresurv' plot( x, fun = "all", conf.int = FALSE, conf.type = c("log", "log-log", "plain"), legend.out = TRUE, xlab = "Time since diagnosis", ylab.haz = "excess hazard", ylab.surv = "net survival", ylab.ptcure = "P(t)", ylab.cumhaz = "cumulative excess hazard", ylab.logcumhaz = "logarithm of cumulative excess hazard", col.haz = "black", col.surv = "black", col.ptcure = "black", col.cumhaz = "black", col.logcumhaz = "black", col.tau = "red", col.ttc = "green4", col.p95 = "black", col.pi = "blue", lty.surv = 1, lty.haz = 1, lty.ptcure = 1, lty.cumhaz = 1, lty.logcumhaz = 1, lty.pi = 2, lty.tau = 2, lty.ttc = 3, lty.p95 = 4, lty.ic = 5, lwd.main = 1, lwd.sub = 1, lwd.ic = 1, ... )
## S3 method for class 'predCuresurv' plot( x, fun = "all", conf.int = FALSE, conf.type = c("log", "log-log", "plain"), legend.out = TRUE, xlab = "Time since diagnosis", ylab.haz = "excess hazard", ylab.surv = "net survival", ylab.ptcure = "P(t)", ylab.cumhaz = "cumulative excess hazard", ylab.logcumhaz = "logarithm of cumulative excess hazard", col.haz = "black", col.surv = "black", col.ptcure = "black", col.cumhaz = "black", col.logcumhaz = "black", col.tau = "red", col.ttc = "green4", col.p95 = "black", col.pi = "blue", lty.surv = 1, lty.haz = 1, lty.ptcure = 1, lty.cumhaz = 1, lty.logcumhaz = 1, lty.pi = 2, lty.tau = 2, lty.ttc = 3, lty.p95 = 4, lty.ic = 5, lwd.main = 1, lwd.sub = 1, lwd.ic = 1, ... )
x |
result of the |
fun |
in "haz" or "surv" or "pt_cure", "cumhaz", "logcumhaz", the plot
produced is that of (excess) hazard, or that of (net) survival, or that of
the probability P(t) of being cured at a given time t after diagnosis
knowing that he/she was alive up to time t is provided, or that of
cumulative hazard or that of the logarithm of the cumulative hazard; if
|
conf.int |
an argument expected to be TRUE if the confidence intervals of the
related-indicator specified by the argument "fun" are needed. The default
option is FALSE. Confidence intervals are not available for |
conf.type |
One of "plain", "log", "log-log". The first option causes the standard intervals curve +- k *se(curve), where k is determined from conf.int. The log option calculates intervals based on log(curve). The log-log option bases the intervals on the log(-log(curve)). |
legend.out |
an argument deciding the place of the legend if |
xlab |
label for the x-axis of the plot. |
ylab.haz |
optional label for the y-axis of the plot of excess hazard |
ylab.surv |
optional label for the y-axis of the plot of net survival |
ylab.ptcure |
optional label for the y-axis of the plot of the probability
|
ylab.cumhaz |
optional label for the y-axis of the plot of cumulative excess hazard |
ylab.logcumhaz |
optional label for the y-axis of the plot of logarithm of cumulative excess hazard |
col.haz |
optional argument to specify the color of curve of the excess hazard |
col.surv |
optional argument to specify the color of curve of the net survival |
col.ptcure |
optional argument to specify the color of curve of probability
|
col.cumhaz |
optional argument to specify the color of curve of cumulative excess hazard |
col.logcumhaz |
optional argument to specify the color of curve of the logarithm of cumulative excess hazard |
col.tau |
optional argument to specify the color of curve of time-to-null excess hazard |
col.ttc |
optional argument to specify the color of curve of time-to-cure |
col.p95 |
optional argument to specify the color for the line highlighting |
col.pi |
optional argument to specify the color of cure proportion |
lty.surv |
stands for line types for net survival |
lty.haz |
stands for line types for excess hazard |
lty.ptcure |
stands for line types for probability P(t) of being cured at a given time t after diagnosis knowing that he/she was alive up to time t. |
lty.cumhaz |
stands for line types for cumulative excess hazard |
lty.logcumhaz |
stands for line types for logarithm cumulative excess hazard |
lty.pi |
stands for line types for cure proportion |
lty.tau |
stands for line types for time-to-null excess hazard |
lty.ttc |
stands for line types for time-to-cure |
lty.p95 |
stands for line types for the line highlighting |
lty.ic |
stands for line types for confidence intervals |
lwd.main |
line width for the main line (haz, surv, pt_cure, cumhaz, logcumhaz) |
lwd.sub |
line width for the additionnal lines (ttc, p95, tau...) |
lwd.ic |
line width for the confidence intervals lines |
... |
additional options as in the classical plot method. |
ylab |
optional label for the y-axis of the plot. Depending to the curve
of interest (hazard, survival, probability of being cured at a given time t,
or all),the argument must be named |
No value is returned.
Juste Goungounga, Judith Breaud, Eugenie Blandin, Olayide Boussari, Valerie Jooste
predict.curesurv()
, print.curesurv()
, curesurv()
, browseVignettes("curesurv")
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh #' #mean of age newdata1 <- with(testiscancer, expand.grid(event = 0, age_crmin = mean(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemean <- predict(object = fit_m1_ad_tneh, newdata = newdata1) #max of age newdata2 <- with(testiscancer, expand.grid(event = 0, age_crmin = max(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemax <- predict(object = fit_m1_ad_tneh, newdata = newdata2) # predictions at time 2 years and of age newdata3 <- with(testiscancer, expand.grid(event = 0, age_crmin = seq(min(testiscancer$age_crmin),max(testiscancer$age_crmin), 0.1), time_obs = 2)) pred_age_val <- predict(object = fit_m1_ad_tneh, newdata = newdata3) #plot of 3 indicators for mean age plot(pred_agemean, fun="all") #plot of net survival for mean and maximum age (comparison) oldpar <- par(no.readonly = TRUE) par(mfrow = c(2, 2), cex = 1.0) plot(pred_agemax$time, pred_agemax$ex_haz, type = "l", lty = 1, lwd = 2, xlab = "Time since diagnosis", ylab = "excess hazard") lines(pred_agemean$time, pred_agemean$ex_haz, type = "l", lty = 2, lwd = 2) legend("topright", horiz = FALSE, legend = c("hE(t) age.max = 79.9", "hE(t) age.mean = 50.8"), col = c("black", "black"), lty = c(1, 2, 1, 1, 2, 2)) grid() plot(pred_agemax$time, pred_agemax$netsurv, type = "l", lty = 1, lwd = 2, ylim = c(0, 1), xlab = "Time since diagnosis", ylab = "net survival") lines(pred_agemean$time, pred_agemean$netsurv, type = "l", lty = 2, lwd = 2) legend("bottomleft", horiz = FALSE, legend = c("Sn(t) age.max = 79.9", "Sn(t) age.mean = 50.8"), col = c("black", "black"), lty = c(1, 2, 1, 1, 2, 2)) grid() plot(pred_agemax$time, pred_agemax$pt_cure, type = "l", lty = 1, lwd = 2, ylim = c(0, 1), xlim = c(0,30), xlab = "Time since diagnosis", ylab = "probability of being cured P(t)") lines(pred_agemean$time, pred_agemean$pt_cure, type = "l", lty = 2, lwd = 2) abline(v = pred_agemean$tau[1], lty = 2, lwd = 2, col = "blue") abline(v = pred_agemean$TTC[1], lty = 2, lwd = 2, col = "red") abline(v = pred_agemax$tau[1], lty = 1, lwd = 2, col = "blue") abline(v = pred_agemax$TTC[1], lty = 1, lwd = 2, col = "red") grid() legend("bottomright", horiz = FALSE, legend = c("P(t) age.max = 79.9", "P(t) age.mean = 50.8", "TNEH age.max = 79.9", "TTC age.max = 79.9", "TNEH age.mean = 50.8", "TTC age.mean = 50.8"), col = c("black", "black", "blue", "red", "blue", "red"), lty = c(1, 2, 1, 1, 2, 2)) val_age <- seq(min(testiscancer$age_crmin), max(testiscancer$age_crmin), 0.1) * sd(testiscancer$age) + min(testiscancer$age) pred_age_val <- predict(object = fit_m1_ad_tneh, newdata = newdata3) par(mfrow=c(2,2)) plot(val_age, pred_age_val$ex_haz, type = "l", lty=1, lwd=2, xlab = "age", ylab = "excess hazard") grid() plot(val_age, pred_age_val$netsurv, type = "l", lty=1, lwd=2, xlab = "age", ylab = "net survival") grid() plot(val_age, pred_age_val$pt_cure, type = "l", lty=1, lwd=2, xlab = "age", ylab = "P(t)") grid() par(oldpar)
library("curesurv") library("survival") testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh #' #mean of age newdata1 <- with(testiscancer, expand.grid(event = 0, age_crmin = mean(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemean <- predict(object = fit_m1_ad_tneh, newdata = newdata1) #max of age newdata2 <- with(testiscancer, expand.grid(event = 0, age_crmin = max(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemax <- predict(object = fit_m1_ad_tneh, newdata = newdata2) # predictions at time 2 years and of age newdata3 <- with(testiscancer, expand.grid(event = 0, age_crmin = seq(min(testiscancer$age_crmin),max(testiscancer$age_crmin), 0.1), time_obs = 2)) pred_age_val <- predict(object = fit_m1_ad_tneh, newdata = newdata3) #plot of 3 indicators for mean age plot(pred_agemean, fun="all") #plot of net survival for mean and maximum age (comparison) oldpar <- par(no.readonly = TRUE) par(mfrow = c(2, 2), cex = 1.0) plot(pred_agemax$time, pred_agemax$ex_haz, type = "l", lty = 1, lwd = 2, xlab = "Time since diagnosis", ylab = "excess hazard") lines(pred_agemean$time, pred_agemean$ex_haz, type = "l", lty = 2, lwd = 2) legend("topright", horiz = FALSE, legend = c("hE(t) age.max = 79.9", "hE(t) age.mean = 50.8"), col = c("black", "black"), lty = c(1, 2, 1, 1, 2, 2)) grid() plot(pred_agemax$time, pred_agemax$netsurv, type = "l", lty = 1, lwd = 2, ylim = c(0, 1), xlab = "Time since diagnosis", ylab = "net survival") lines(pred_agemean$time, pred_agemean$netsurv, type = "l", lty = 2, lwd = 2) legend("bottomleft", horiz = FALSE, legend = c("Sn(t) age.max = 79.9", "Sn(t) age.mean = 50.8"), col = c("black", "black"), lty = c(1, 2, 1, 1, 2, 2)) grid() plot(pred_agemax$time, pred_agemax$pt_cure, type = "l", lty = 1, lwd = 2, ylim = c(0, 1), xlim = c(0,30), xlab = "Time since diagnosis", ylab = "probability of being cured P(t)") lines(pred_agemean$time, pred_agemean$pt_cure, type = "l", lty = 2, lwd = 2) abline(v = pred_agemean$tau[1], lty = 2, lwd = 2, col = "blue") abline(v = pred_agemean$TTC[1], lty = 2, lwd = 2, col = "red") abline(v = pred_agemax$tau[1], lty = 1, lwd = 2, col = "blue") abline(v = pred_agemax$TTC[1], lty = 1, lwd = 2, col = "red") grid() legend("bottomright", horiz = FALSE, legend = c("P(t) age.max = 79.9", "P(t) age.mean = 50.8", "TNEH age.max = 79.9", "TTC age.max = 79.9", "TNEH age.mean = 50.8", "TTC age.mean = 50.8"), col = c("black", "black", "blue", "red", "blue", "red"), lty = c(1, 2, 1, 1, 2, 2)) val_age <- seq(min(testiscancer$age_crmin), max(testiscancer$age_crmin), 0.1) * sd(testiscancer$age) + min(testiscancer$age) pred_age_val <- predict(object = fit_m1_ad_tneh, newdata = newdata3) par(mfrow=c(2,2)) plot(val_age, pred_age_val$ex_haz, type = "l", lty=1, lwd=2, xlab = "age", ylab = "excess hazard") grid() plot(val_age, pred_age_val$netsurv, type = "l", lty=1, lwd=2, xlab = "age", ylab = "net survival") grid() plot(val_age, pred_age_val$pt_cure, type = "l", lty=1, lwd=2, xlab = "age", ylab = "P(t)") grid() par(oldpar)
return predicted (excess) hazard, (net) survival, cure fraction and time to null excess hazard or time to cure.
## S3 method for class 'curesurv' predict( object, newdata = NULL, xmax = 10^9, level = 0.975, epsilon = 0.05, sign_delta = 1, ... )
## S3 method for class 'curesurv' predict( object, newdata = NULL, xmax = 10^9, level = 0.975, epsilon = 0.05, sign_delta = 1, ... )
object |
Output from |
newdata |
the new data to be specified for predictions; If else, predictions are made using the data provided during the estimation step in order to obtain the output from curesurv function. |
xmax |
maximum time at which Time-to-Cure is evaluated numerically. |
level |
|
epsilon |
value fixed by user to estimate the TTC |
sign_delta |
sign of effect of delta on covariates acting on survival function, positive by default "sign_delta = 1" and alternative is "sign_delta = -1" |
... |
additional parameters |
An object of class c("pred_curesurv", "data.frame")
.
This object is a list containing the following components:
time |
time in the input new data |
ex_haz |
predicted excess hazard at the time provided in the new data |
netsurv |
predicted net survival at the time provided in the new data |
pt_cure |
probability to be cured |
tau |
time to null in model TNEH when object corresponds to the results from Boussari model or its extension. |
netsurv_tau |
pi or net survival at time tau when object corresponds to the results from Boussari model or its extension. |
time_to_cure_ttc |
time to cure (TTC) |
Juste Goungounga, Judith Breaud, Olayide Boussari, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2021 Dec;77(4):1289-1302. doi: 10.1111/biom.13361. Epub 2020 Sep 12. PMID: 32869288. (pubmed)
Boussari O, Romain G, Remontet L, Bossard N, Mounier M, Bouvier AM, Binquet C, Colonna M, Jooste V. A new approach to estimate time-to-cure from cancer registries data. Cancer Epidemiol. 2018 Apr;53:72-80. doi: 10.1016/j.canep.2018.01.013. Epub 2018 Feb 4. PMID: 29414635. (pubmed)
Phillips N, Coldman A, McBride ML. Estimating cancer prevalence using mixture models for cancer survival. Stat Med. 2002 May 15;21(9):1257-70. doi: 10.1002/sim.1101. PMID: 12111877. (pubmed)
De Angelis R, Capocaccia R, Hakulinen T, Soderman B, Verdecchia A. Mixture models for cancer survival analysis: application to population-based data with covariates. Stat Med. 1999 Feb 28;18(4):441-54. doi: 10.1002/(sici)1097-0258(19990228)18:4<441::aid-sim23>3.0.co;2-m. PMID: 10070685. (pubmed)
print.curesurv()
, curesurv()
, browseVignettes("curesurv")
library("curesurv") library("survival") fit_m2_ml <- curesurv(Surv(time_obs, event) ~ age_cr|age_cr, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", data = pancreas_data, method_opt = "L-BFGS-B") fit_m2_ml newdata <- pancreas_data[2,] predict(object = fit_m2_ml, newdata = newdata) ## Non mixture cure model ### TNEH model #### Additive parametrization testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh predict(object = fit_m1_ad_tneh, newdata = testiscancer[3:6,]) #mean of age newdata1 <- with(testiscancer, expand.grid(event = 0, age_crmin = mean(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemean <- predict(object = fit_m1_ad_tneh, newdata = newdata1) #max of age newdata2 <- with(testiscancer, expand.grid(event = 0, age_crmin = max(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemax <- predict(object = fit_m1_ad_tneh, newdata = newdata2) head(pred_agemax)
library("curesurv") library("survival") fit_m2_ml <- curesurv(Surv(time_obs, event) ~ age_cr|age_cr, pophaz = "ehazard", cumpophaz = "cumehazard", model = "mixture", data = pancreas_data, method_opt = "L-BFGS-B") fit_m2_ml newdata <- pancreas_data[2,] predict(object = fit_m2_ml, newdata = newdata) ## Non mixture cure model ### TNEH model #### Additive parametrization testiscancer$age_crmin <- (testiscancer$age- min(testiscancer$age)) / sd(testiscancer$age) fit_m1_ad_tneh <- curesurv(Surv(time_obs, event) ~ z_tau(age_crmin) + z_alpha(age_crmin), pophaz = "ehazard", cumpophaz = "cumehazard", model = "nmixture", dist = "tneh", link_tau = "linear", data = testiscancer, method_opt = "L-BFGS-B") fit_m1_ad_tneh predict(object = fit_m1_ad_tneh, newdata = testiscancer[3:6,]) #mean of age newdata1 <- with(testiscancer, expand.grid(event = 0, age_crmin = mean(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemean <- predict(object = fit_m1_ad_tneh, newdata = newdata1) #max of age newdata2 <- with(testiscancer, expand.grid(event = 0, age_crmin = max(age_crmin), time_obs = seq(0.001,10,0.1))) pred_agemax <- predict(object = fit_m1_ad_tneh, newdata = newdata2) head(pred_agemax)
Print an object of class "curesurv"
## S3 method for class 'curesurv' print(x, digits = max(1L, getOption("digits") - 3L), signif.stars = FALSE, ...)
## S3 method for class 'curesurv' print(x, digits = max(1L, getOption("digits") - 3L), signif.stars = FALSE, ...)
x |
an object of class "curesurv". |
digits |
minimum number of significant digits to be used for most numbers. |
signif.stars |
logical; if TRUE, P-values are additionally encoded visually as "significance stars" in order to help scanning of long coefficient tables. |
... |
additional options |
an object of class "curesurv" representing the fit. See curesurv
for details.
Juste Goungounga, Judith Breaud, Eugenie Blandin, Olayide Boussari, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2020 Aug 31. doi: 10.1111/biom.13361. Epub ahead of print. PMID: 32869288. (pubmed)
Phillips N, Coldman A, McBride ML. Estimating cancer prevalence using mixture models for cancer survival. Stat Med. 2002 May 15;21(9):1257-70. doi: 10.1002/sim.1101. PMID: 12111877. (pubmed)
De Angelis R, Capocaccia R, Hakulinen T, Soderman B, Verdecchia A. Mixture models for cancer survival analysis: application to population-based data with covariates. Stat Med. 1999 Feb 28;18(4):441-54. doi: 10.1002/(sici)1097-0258(19990228)18:4<441::aid-sim23>3.0.co;2-m. PMID: 10070685. (pubmed)
predict.curesurv()
, curesurv()
, browseVignettes("curesurv")
library("curesurv") library("survival") # overall survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate fit_ml0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") print(fit_ml0)
library("curesurv") library("survival") # overall survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate fit_ml0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") print(fit_ml0)
summary an object of class "curesurv"
## S3 method for class 'curesurv' summary( object, digits = max(1L, getOption("digits") - 3L), signif.stars = FALSE, ... )
## S3 method for class 'curesurv' summary( object, digits = max(1L, getOption("digits") - 3L), signif.stars = FALSE, ... )
object |
an object of class "curesurv". |
digits |
minimum number of significant digits to be used for most numbers. |
signif.stars |
logical; if TRUE, P-values are additionally encoded visually as "significance stars" in order to help scanning of long coefficient tables. |
... |
additional options |
an object of class "curesurv" representing the fit. See curesurv
for details.
Juste Goungounga, Judith Breaud, Eugenie Blandin, Olayide Boussari, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2020 Aug 31. doi: 10.1111/biom.13361. Epub ahead of print. PMID: 32869288. (pubmed)
Phillips N, Coldman A, McBride ML. Estimating cancer prevalence using mixture models for cancer survival. Stat Med. 2002 May 15;21(9):1257-70. doi: 10.1002/sim.1101. PMID: 12111877. (pubmed)
De Angelis R, Capocaccia R, Hakulinen T, Soderman B, Verdecchia A. Mixture models for cancer survival analysis: application to population-based data with covariates. Stat Med. 1999 Feb 28;18(4):441-54. doi: 10.1002/(sici)1097-0258(19990228)18:4<441::aid-sim23>3.0.co;2-m. PMID: 10070685. (pubmed)
predict.curesurv()
, curesurv()
, browseVignettes("curesurv")
library("curesurv") library("survival") # overall survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate fit_ml0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") summary(fit_ml0)
library("curesurv") library("survival") # overall survival setting # Mixture cure model with Weibull function for the uncured patients survival: # no covariate fit_ml0 <- curesurv(Surv(time_obs, event) ~ 1 | 1, model = "mixture", dist = "weib", data = testiscancer, method_opt = "L-BFGS-B") summary(fit_ml0)
Simulated dataset of 2000 individuals as in Boussari et al. (2020), following setting 1 sub-scenario design.
data(testiscancer)
data(testiscancer)
This dataset contains the following variables:
Age at diagnosis
centered and scaled age at diagnosis
"<40", "40_65" and ">=65" age groups
Follow-up time (years)
Vital status
individual cumulative expected hazard
individual instantaneous expected hazard
individual expected survival
data(testiscancer) summary(testiscancer)
data(testiscancer) summary(testiscancer)
variables adjusted on alpha parameter in non-mixture cure model with "tneh" specified for the distribution.
z_alpha(x)
z_alpha(x)
x |
a simple formula. |
the variable x
Juste Goungounga, Judith Breaud, Olayide Boussari, Gaelle Romain, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2020 Aug 31. doi: 10.1111/biom.13361. Epub ahead of print. PMID: 32869288. (pubmed)
variables adjusted on tau parameter in non-mixture cure model with "tneh" specified for the distribution.
z_tau(x)
z_tau(x)
x |
the name of the column in the dataset representing the variable that will act on tau parameter of the "tneh" model |
the variable x
Juste Goungounga, Judith Breaud, Eugenie Blandin, Olayide Boussari, Valerie Jooste
Boussari O, Bordes L, Romain G, Colonna M, Bossard N, Remontet L, Jooste V. Modeling excess hazard with time-to-cure as a parameter. Biometrics. 2020 Aug 31. doi: 10.1111/biom.13361. Epub ahead of print. PMID: 32869288. (pubmed)