Learn R Programming

depCensoring (version 0.1.7)

Statistical Methods for Survival Data with Dependent Censoring

Description

Several statistical methods for analyzing survival data under various forms of dependent censoring are implemented in the package. In addition to accounting for dependent censoring, it offers tools to adjust for unmeasured confounding factors. The implemented approaches allow users to estimate the dependency between survival time and dependent censoring time, based solely on observed survival data. For more details on the methods, refer to Deresa and Van Keilegom (2021) , Czado and Van Keilegom (2023) , Crommen et al. (2024) , Deresa and Van Keilegom (2024) , Rutten et al. (2024+) and Ding and Van Keilegom (2024).

Copy Link

Version

Install

install.packages('depCensoring')

Monthly Downloads

217

Version

0.1.7

License

GPL-3

Maintainer

Negera Wakgari Deresa

Last Published

March 11th, 2025

Functions in depCensoring (0.1.7)

G.hat

Compute the Gn matrix in step 3b of Bei (2024).
LikGamma2

First step log-likelihood function for Z binary.
Lambda_AFT_ll

Link function (AFT model)
LikCopInd

Loglikehood function under independent censoring
Lambda_inverse_Cox_wb

Inverse of link function (Cox model)
LikI.bis

Second likelihood function needed to fit the independence model in the second step of the estimation procedure.
G.box

Family of box functions
MSpoint

Analogue to KMS_AUX4_MSpoints(...) in MATLAB code of Bei (2024).
G.cd

Family of continuous/discrete instrumental function
M_step

M-step in the EAM algorithm described in KMS19.
Lambda_Cox_wb

Link function (Cox model)
NonParTrans

Fit a semiparametric transformation model for dependent censoring
Omega.hat

Obtain the correlation matrix of the moment functions
EI

Expected improvement
Lambda_inverse_AFT_ll

Inverse of link function (AFT model)
E_step

E-step in the EAM algorithm as described in KMS19.
S.func

S-function
G.spline

Family of spline instrumental functions
PseudoL

Likelihood function under dependent censoring
Likelihood.Profile.Solve

Solve the profiled likelihood function
Likelihood.Semiparametric

Calculate the semiparametric version of profiled likelihood function
SearchIndicate

Search function
ScoreEqn

Score equations of finite parameters
IYJtrans

Inverse Yeo-Johnson transformation function
LikI.cmprsk

Second step log-likelihood function under independence assumption.
SurvDC.GoF

Calculate the goodness-of-fit test statistic
SurvDC

Semiparametric Estimation of the Survival Function under Dependent Censoring
Sigma.hat

Compute the variance-covariance matrix of the moment functions.
SolveScore

Estimate finite parameters based on score equations
LikI.cmprsk.Cholesky

Wrapper implementing likelihood function assuming independence between competing risks and censoring using Cholesky factorization.
control.arguments

Prepare initial values within the control arguments
SolveLI

Cumulative hazard function of survival time under independent censoring
chol2par.elem

Transform Cholesky decomposition to covariance matrix parameter element.
SolveH

Estimate a nonparametric transformation function
boot.fun

Nonparametric bootstrap approach for the dependent censoring model
boot.funI

Nonparametric bootstrap approach for the independent censoring model
TCsim

Function to simulate (Y,Delta) from the copula based model for (T,C).
check.args.pisurv

Check argument consistency.
SolveHt1

Estimating equation for Ht1
Longfun

Long format
SolveL

Cumulative hazard function of survival time under dependent censoring
LongNPT

Change H to long format
chol2par

Transform Cholesky decomposition to covariance matrix
YJtrans

Yeo-Johnson transformation function
SurvFunc.CG

Estimated survival function based on copula-graphic estimator (Archimedean copula only)
copdist.Archimedean

The distribution function of the Archimedean copula
cr.lik

Competing risk likelihood function.
dLambda_AFT_ll

Derivative of link function (AFT model)
get.anchor.points

Get anchor points on which to base the instrumental functions
SurvFunc.KM

Estimated survival function based on Kaplan-Meier estimator
dm.bar

Vector of sample average of each moment function \((\bar{m}_n(\theta))\).
feasible_point_search

Method for finding initial points of the EAM algorithm
fitDepCens

Fit Dependent Censoring Models
get.cond.moment.evals

Compute the conditional moment evaluations
dchol2par.elem

Derivative of transform Cholesky decomposition to covariance matrix element.
dLambda_Cox_wb

Derivative of link function (Cox model)
dat.sim.reg.comp.risks

Data generation function for competing risks data
clear.plt.wdw

Clear plotting window
do.optimization.Mstep

Optimize the expected improvement
draw.sv.init

Draw initial set of starting values for optimizing the expected improvement.
dchol2par

Derivative of transform Cholesky decomposition to covariance matrix.
insert.row

Insert row into a matrix at a given row index
dD.hat

Obtain the matrix of partial derivatives of the sample variances.
ktau.to.coppar

Convert the Kendall's tau into the copula parameter
generator.Archimedean

The generator function of the Archimedean copula
fitIndepCens

Fit Independent Censoring Models
loglike.indep.unconstrained

Log-likelihood function for the independence copula.
get.cvLLn

Compute the critical value of the test statistic.
loglike.gumbel.unconstrained

Log-likelihood function for the Gumbel copula.
plot_addpte.eval

Draw evaluated points.
plot_addpte

Draw points to be evaluated
get.test.statistic

Obtain the test statistic by minimizing the S-function over the feasible region \(\beta(r)\).
get.instrumental.function.evals

Evaluate each instrumental function at each of the observations.
get.deriv.mom.func

Matrix of derivatives of conditional moment functions
loglike.frank.unconstrained

Log-likelihood function for the Frank copula.
get.mi.mat

Faster implementation of vector of moment functions.
variance.cmprsk

Compute the variance of the estimates.
estimate.cf

Estimate the control function
estimate.cmprsk

Estimate the competing risks model of Rutten, Willems et al. (20XX).
gs.algo.bidir

Rudimentary, bidirectional 1D grid search algorithm.
get.extra.Estep.points

Get extra evaluation points for E-step
get.dmi.tens

Faster implementation to obtain the tensor of the evaluations of the derivatives of the moment functions at each observation.
lf.delta.beta1

Loss function to compute Delta(beta).
lf.ts

'Loss function' of the test statistic.
log_transform

Logarithmic transformation function.
loglike.gaussian.unconstrained

Log-likelihood function for the Gaussian copula.
loglike.clayton.unconstrained

Log-likelihood function for the Clayton copula.
parafam.d

Obtain the value of the density function
parafam.p

Obtain the value of the distribution function
LikF.cmprsk

Second step log-likelihood function.
LikGamma1

First step log-likelihood function for Z continuous
gridSearch

Grid search algorithm for finding the identified set
Likelihood.Parametric

Calculate the likelihood function for the fully parametric joint distribution
gs.interpolation

Return the next point to evaluate when doing interpolation search
ParamCop

Estimation of a parametric dependent censoring model without covariates.
Parameters.Constraints

Generate constraints of parameters
Likelihood.Profile.Kernel

Calculate the profiled likelihood function with kernel smoothing
normalize.covariates

Normalize the covariates of a data set to lie in the unit interval by scaling based on the ranges of the covariates.
plot_base

Draw base plot
test.point_Bei_MT

Perform the test of Bei (2024) simultaneously for multiple time points.
m.bar

Vector of sample average of each moment function \((\bar{m}_n(\theta))\).
gs.regular

Return the next point to evaluate when doing regular grid search
power_transform

Power transformation function.
uniformize.data

Standardize data format
SurvMLE

Maximum likelihood estimator for a given parametric distribution
set.hyperparameters

Define the hyperparameters used for finding the identified interval
coppar.to.ktau

Convert the copula parameter the Kendall's tau
SurvMLE.Likelihood

Likelihood for a given parametric distribution
cophfunc

The h-function of the copula
summary.depFit

Summary of depCensoringFit object
cbMV

Combine bounds based on majority vote.
boot.nonparTrans

Nonparametric bootstrap approach for a Semiparametric transformation model under dependent censpring
gs.binary

Return the next point to evaluate when doing binary search
get.next.point

Obtain next point for feasible point search.
set.EAM.hyperparameters

Set default hyperparameters for EAM algorithm
get.starting.values

Main function for obtaining the starting values of the expected improvement maximization step.
set.GS.hyperparameters

Set default hyperparameters for grid search algorithm
normalize.covariates2

Normalize the covariates of a data set to lie in the unit interval by transforming based on PCA.
parafam.trunc

Obtain the adjustment value of truncation
optimlikelihood

Fit the dependent censoring models.
test.point_Bei

Perform the test of Bei (2024) for a given point
summary.indepFit

Summary of indepCensoringFit object
likF.cmprsk.Cholesky

Wrapper implementing likelihood function using Cholesky factorization.
likIFG.cmprsk.Cholesky

Full likelihood (including estimation of control function).
pi.surv

Estimate the model of Willems et al. (2024+).
EAM

Main function to run the EAM algorithm
EAM.converged

Check convergence of the EAM algorithm.
D.hat

Obtain the diagonal matrix of sample variances of moment functions
Distance

Distance between vectors
Bvprob

Compute bivariate survival probability
Chronometer

Chronometer object
CompC

Compute phi function
DYJtrans

Derivative of the Yeo-Johnson transformation function
A_step

A-step in the EAM algorithm described in KMS19
Bspline.unit.interval

Evaluate the specified B-spline, defined on the unit interval
G.cd.mc

Family of discrete/continuous instrumental functions, in the case of many covariates.
Kernel

Calculate the kernel function