Package 'DepCens'

Title: Dependent Censoring Regression Models
Description: Dependent censoring regression models for survival multivariate data. These models are based on extensions of the frailty models, capable to accommodating 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. (2019) <doi:10.1002/bimj.201800391>.
Authors: Silvana Schneider [aut, cre] , Gabriel Grandemagne dos Santos [aut]
Maintainer: Silvana Schneider <[email protected]>
License: GPL (>= 2)
Version: 0.2.2
Built: 2025-02-14 04:41:10 UTC
Source: https://github.com/gabrielgrandemagne/depcens

Help Index


The 'DepCens' package.

Description

Dependent censoring regression models for survival multivariate data. These models are based on extensions of the frailty models, capable to accommodating 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. (2019) <doi: 10.1002/bimj.201800391>.

References

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.


Dependent Censoring model

Description

dependent.censoring can be used to fit survival data with dependent censoring, it can also be utilized to take into account informative censoring.

Usage

dependent.censoring(
  formula,
  data,
  delta_t,
  delta_c,
  ident,
  dist = c("weibull", "mep"),
  Num_intervals = 10
)

Arguments

formula

an object of class "formula": should be used as 'time ~ failure 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).

Details

This function estimates the parameters of the Piecewise exponential model (dist = "mep") or Weibull model (dist = "weibull") with dependent censoring, considering the frailty model to estimate the clusters variability and a parameter that captures the dependence between failure and dependent censoring times.

Value

dependent.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 failure times, 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), Baysian 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 failure times (event of interest times).

  • q number of covariates associated with 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 failure times and with the dependent censoring times.

  • labels1 labels of the covariates associated with failure times.

  • labels2 labels of the covariates associated with 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 fragilities, one of the outputs of the function dependent.censoring, in which the individuals are in the rows and the Monte Carlo replicas in the columns.

  • X_T a matrix of variables associated with failure times.

  • X_C a matrix of variables associated with dependent censoring times.

  • time a vector of the observable times.

Examples

library(DepCens)
delta_t <- ifelse(KidneyMimic$cens==1,1,0)
delta_c <- ifelse(KidneyMimic$cens==2,1,0)
fit <- dependent.censoring(formula = time ~ x1 | x3, data=KidneyMimic, delta_t=delta_t,
                          delta_c=delta_c, ident=KidneyMimic$ident, dist = "mep")
summary_dc(fit)

KidneyMimic data set

Description

A simulated data frame with 200 individuals, distributed in 40 clinics (clusters) with 5 individuals per clinic. Simulated dataset that mimic a kidney result study. In this simulated dataset it is hypothetically suggested the following causes of outcome: event of interest: death due to kidney failure; dependent censoring: if the patient received a transplant; administrative censoring: all other outcomes.

Format

A data frame with 200 rows and 9 variables:

  • ident: Variable that indicates the clinic (cluster) of the patient.

  • time: time observed until the occurrence of the outcome.

  • event: variable that indicates the occurrence of the event of interest, event=1 if the event of interest occurs.

  • x1: covariate 1, generated from a Uniform Distribution. Can denote, for example, a exam result.

  • x2: covariate 2, generated from a Binomial Distribution. Can denote, for example, an treatment

  • x3: covariate 3, generated from a Normal Distribution. can denote, for example, an standardized age.

  • cens: variable that indicates the outcome, cens=1 if the event of interest occurred (death due to kidney failure); cens=2 if the dependent censoring occurred (patient received a transplant); cens=3 if administrative censoring.

  • delta_t: indicator function of the event of interest.

  • delta_c: indicator function of the dependent censoring.


Plot the survival function

Description

This graph helps to visualize the survival function.

Usage

plot_dc(object, scenario = c("t", "c", "both"))

Arguments

object

an object of the class "dcensoring".

scenario

which defines the scenario in the graph (t: failure times, c: dependent censoring times, or both).

Details

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.

Value

a survival function graph of the fitted model.

Examples

fit <- dependent.censoring(formula = time ~ x1 | x3, data=KidneyMimic, delta_t=KidneyMimic$delta_t,
                          delta_c=KidneyMimic$delta_c, ident=KidneyMimic$ident, dist = "mep")
plot_dc(fit, scenario = "both")

Print the summary output

Description

Print the summary output

Usage

summary_dc(object, ...)

Arguments

object

an object of the class "dcensoring".

...

further arguments passed to or from other methods.

Value

a summary of the fitted model.

Examples

fit <- dependent.censoring(formula = time ~ x1 | x3, data=KidneyMimic, delta_t=KidneyMimic$delta_t,
                          delta_c=KidneyMimic$delta_c, ident=KidneyMimic$ident, dist = "mep")
summary_dc(fit)