Title: | Dependent Censoring Regression Models with Cure Fraction |
---|---|
Description: | Cure dependent censoring regression models for long-term survival multivariate data. These models are based on extensions of the frailty models, capable to accommodating the cure fraction and the dependence between failure and censoring times, with Weibull and piecewise exponential marginal distributions. Theoretical details regarding the models implemented in the package can be found in Schneider et al. (2022) <doi:10.1007/s10651-022-00549-0>. |
Authors: | Silvana Schneider [aut, cre] |
Maintainer: | Silvana Schneider <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2025-03-13 05:01:59 UTC |
Source: | https://github.com/gabrielgrandemagne/curedepcens |
Cure dependent censoring regression models for long-term survival multivariate data. These models are based on extensions of the frailty models, capable to accommodating the cure fraction and the dependence between failure and censoring times, with Weibull and piecewise exponential marginal distributions. Theoretical details regarding the models implemented in the package can be found in Schneider et al. (2022) <doi:10.1007/s10651-022-00549-0>.
Schneider, S.; Demarqui, F. N.; Costa, E. F. (2022). Free-ranging dogs' lifetime estimated by an approach for long-term survival data with dependent censoring. Environmental and Ecological Statistics, v.29, 869–911.
Schneider, S.; Demarqui, F. N.; Colosimo, E. A.; Mayrink, V. D. (2020). An approach to model clustered survival data with dependent censoring. Biometrical Journal, v.62, n.1, 157–174.
Louis, T. A. (1982). Finding the observed information matrix when using the EM algorithm. Journal of the Royal Statistical Society, B44, 226-233.
Paul M., Majumder S.; Sau S.; Nandi A.; Bhadra A. (2016). High early life mortality in free-ranging dogs is largely influenced by humans. Scientific Reports v.6.
cure_dep_censoring can be used to fit survival data with cure fraction and dependent censoring. It can also be utilized to take into account informative censoring.
cure_dep_censoring( formula, data, delta_t, delta_c, ident, dist = c("weibull", "mep"), Num_intervals = 3 )
cure_dep_censoring( formula, data, delta_t, delta_c, ident, dist = c("weibull", "mep"), Num_intervals = 3 )
formula |
an object of class "formula": should be used as 'time ~ cure covariates | informative covariates'. |
data |
a data frame, list or environment containing the variables. |
delta_t |
Indicator function of the event of interest. |
delta_c |
Indicator function of the dependent censoring. |
ident |
Cluster variable. |
dist |
distribution to be used in the model adjustment, specifies the marginal distribution of times (must be either weibull or mep). |
Num_intervals |
Number of intervals of the time grid (mep only). |
This function estimates the parameters of the Piecewise exponential model (dist = "mep") or Weibull model (dist = "weibull") with cure rate and dependent censoring, considering the frailty model to estimate the clusters variability and a parameter that captures the dependence between failure and dependent censoring times.
cure_dep_censoring returns an object of class "dcensoring" containing the results of the fitted models. An object of class "dcensoring" is a list containing at least the following components:
param_est
a vector containing estimated parameters (dependency parameter, regression coefficients associated with the cure rate, regression coefficients associated with dependent censoring times, and time distribution parameters (Weibull or piecewise exponential)).
stde
a vector containing the estimated standard errors of the estimated parameters vector.
crit
a vector containing the information criteria, Akaike's information criterion (AIC), Bayesian information criterion (BIC), Hannan-Quinn information criterion (HQ), calculated according to Louis, T. A. (1982).
pvalue
p-value of the estimated parameters vector.
n
number of observations in the dataset.
p
number of covariates associated with the cure fraction.
q
number of covariates associated with the dependent censoring times (informative censoring times or competitive risk times).
formula
formula used in the function call.
terms
the terms object used, containing the covariates associated with the cure fraction and with the dependent censoring times.
labels1
labels of the covariates associated with the cure fraction.
labels2
labels of the covariates associated with the dependent censoring times.
risco_a_T
a vector containing the cumulative baseline hazar of failure times.
risco_a_C
a vector containing the cumulative baseline hazar of dependent censoring times.
bi
a matrix containing the generated frailties, one of the outputs of the function cure_dep_censoring, in which the individuals are in the rows and the Monte Carlo replicas in the columns.
X_Cure
a matrix of variables associated with the cure fraction.
X_C
a matrix of variables associated with the dependent censoring times.
time
a vector of the observable times.
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep")
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep")
A simulated data frame with 800 dogs. Simulated dataset that mimic a free-ranging dogs result study. In this simulated dataset it is hypothetically suggested the following causes of outcome: event of interest: death due to natural causes; dependent censoring: age until adopted or death due to human causes; administrative censoring: all other outcomes. More details about the dog study can be found at Paul et al. (2016).
A data frame with 800 rows and 13 variables:
u: auxiliary variable, with Uniform distribution.
v: auxiliary variable, with Uniform distribution.
t: variable that represents the failure time.
c: variable that represents the dependent censoring time.
time: time observed until the occurrence of the outcome, min(t,c).
event: variable that indicates the occurrence of the event of interest, event=1 if the event of interest occurs.
int: auxiliary variable to generate the intercept.
x1_cure: covariate 1, generated from a Binomial distribution. Can denote, for example, a binary result.
x2_cure: covariate 2, generated from a Normal distribution. Can denote, for example, a exam result or an standardized age.
x_c1: covariate 3, generated from a Normal distribution. Can denote, for example, an standardized age.
x_c2: covariate 4, generated from a Binomial distribution. can denote, for example, an treatment result.
cens: variable that indicates the outcome, cens=1 if the event of interest occurred (death due to natural causes); cens=2 if the dependent censoring occurred (age until adopted or death due to human causes); cens=3 if administrative censoring.
ident: Variable that indicates the litter or cluster.
This graph helps to visualize the survival function.
plot_cure(object, scenario = c("t", "c", "both"))
plot_cure(object, scenario = c("t", "c", "both"))
object |
an object of the class "dcensoring". |
scenario |
which defines the scenario in the graph (t: failure times, c: dependent censoring times, or both). |
In order to smooth the line presented in the graph, we used the 'lowess' function. So, it can result in a non-monotonous survival function.
a survival function graph of the fitted model.
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep") plot_cure(fit, scenario = "t")
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep") plot_cure(fit, scenario = "t")
Print the summary output
summary_cure(object, ...)
summary_cure(object, ...)
object |
an object of the class "dcensoring". |
... |
further arguments passed to or from other methods. |
a summary of the fitted model.
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep") summary_cure(fit)
library(CureDepCens) delta_t = ifelse(Dogs_MimicData$cens==1,1,0) delta_c = ifelse(Dogs_MimicData$cens==2,1,0) fit <- cure_dep_censoring(formula = time ~ x1_cure + x2_cure | x_c1 + x_c2, data = Dogs_MimicData, delta_t = delta_t, delta_c = delta_c, ident = Dogs_MimicData$ident, dist = "mep") summary_cure(fit)