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).
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.
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.
Examples
# \donttest{
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)
#>
#> MEP approach
#>
#> Name Estimate Std. Error CI INF CI SUP p-value
#> Alpha 1.313835 0.4372906 -1.261282 3.888952 0.00266
#> Sigma 0.3996922 0.1884796 0.000000 1.183089
#>
#> Coefficients T:
#>
#> Name Estimate Std. Error CI INF CI SUP p-value
#> 0.04750626 0.01984829 0.00860361 0.08640891 0.01669
#>
#> Coefficients C:
#>
#> Name Estimate Std. Error CI INF CI SUP p-value
#> 0.01885825 0.1734772 -0.321157 0.3588735 0.9134
#>
#> ----------------------------------------------------------------------------------
#>
#> Information criteria:
#>
#> AIC BIC HQ
#> 477.1289 552.9902 507.8288
#>
# }