Title: Dependent Censoring Regression Models with Cure Fraction
Version: 0.1.0
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>.
License: GPL (≥ 3)
URL: https://github.com/GabrielGrandemagne/CureDepCens
BugReports: https://github.com/GabrielGrandemagne/CureDepCens/issues
Depends: R (≥ 2.10)
Imports: dlm, Formula, rootSolve, survival, matrixStats, stats
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.2
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2023-06-26 20:20:47 UTC; Gabriel-PC
Author: Silvana Schneider ORCID iD [aut, cre], Gabriel Grandemagne dos Santos [aut]
Maintainer: Silvana Schneider <silvana.schneider@ufrgs.br>
Repository: CRAN
Date/Publication: 2023-06-27 19:00:02 UTC

The 'CureDepCens' package.

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>.

References

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.


Dogs_MimicData data set

Description

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).

Format

A data frame with 800 rows and 13 variables:


Cure Dependent Censoring model

Description

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.

Usage

cure_dep_censoring(
  formula,
  data,
  delta_t,
  delta_c,
  ident,
  dist = c("weibull", "mep"),
  Num_intervals = 3
)

Arguments

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).

Details

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.

Value

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:

Examples


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 the survival function

Description

This graph helps to visualize the survival function.

Usage

plot_cure(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


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

Description

Print the summary output

Usage

summary_cure(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


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)