rc_scmprisk_Cox: Copula regression models with Cox margins for semi-competing...

View source: R/rc_scmprisk_Cox.R

rc_scmprisk_CoxR Documentation

Copula regression models with Cox margins for semi-competing risk data under right censoring cases

Description

Fits a copula model with Cox margins for semi-competing risk data under right censoring cases.

Usage

rc_scmprisk_Cox(
  data,
  var_list,
  copula_type = "Clayton",
  l1 = 0,
  l2 = 0,
  m1 = 3,
  m2 = 3,
  u1 = NULL,
  u2 = NULL,
  eta_ini_ini = 2,
  method1a1 = "BFGS",
  method1a2 = "BFGS",
  method1b = "BFGS",
  method2 = "BFGS",
  stepsize = 10000,
  initial_par1a1 = NULL,
  initial_par1a2 = NULL
)

Arguments

data

a data frame. Each row is a single individual with single observation. Must have time1 (time for non-terminal event), time2 (time for terminal event), status1 (indicator for non-terminal event, 0 if exactly observe, 1 if censored by terminal event, end of cohort or loss to follow-up), status2 (indicator for terminal event, 0 if exactly observe, 1 if censored by end of cohort or loss to follow-up), and covariates by column.

var_list

List of covariates to be included in the model.

copula_type

The type of copula to use (e.g., "Clayton", "Gumbel").

l1

Lower bound for Bernstein polynomial for event 1 (default is 0).

l2

Lower bound for Bernstein polynomial for event 2 (default is 0).

m1

Order of Bernstein polynomial for event 1 (default is 3).

m2

Order of Bernstein polynomial for event 2 (default is 3).

u1

Upper bound for Bernstein polynomial for event 1 (default is max(obs_time) + 1).

u2

Upper bound for Bernstein polynomial for event 2 (default is max(obs_time) + 1).

eta_ini_ini

a vector of initial values for copula parameters, default is 2

method1a1

Optimization method for step 1a1 (default is "BFGS").

method1a2

Optimization method for step 1a2 (default is "BFGS").

method1b

Optimization method for step 1b (default is "BFGS").

method2

Optimization method for step 2 (default is "BFGS").

stepsize

Maximum number of iterations for optimization steps (default is 10000).

initial_par1a1

initial value for parameter when estimating in step 1a_1.

initial_par1a2

initial value for parameter when estimating in step 1a_2.

Details

The input data must be a data frame. Each row is a single individual with single observation. Must have time1 (time for non-terminal event), time2 (time for terminal event), status1 (indicator for non-terminal event, 0 if exactly observe, 1 if censored by terminal event, end of cohort or loss to follow-up), status2 (indicator for terminal event, 0 if exactly observe, 1 if censored by end of cohort or loss to follow-up), and covariates by column.

The supported copula model in this version is "Clayton" and "Gumbel". The parametric generator functions of copula functions are list below:

The Clayton copula has a generator

\phi_{\eta}(t) = (1+t)^{-1/\eta},

with \eta > 0 and Kendall's \tau = \eta/(2+\eta).

The Gumbel copula has a generator

\phi_{\eta}(t) = \exp(-t^{1/\eta}),

with \eta \ge 1 and Kendall's \tau = 1-1/\eta.

The marginal Cox semiparametric models are built based on Bernstein polynomials, which is formulated below:

S(t|Z) = \exp[-\Lambda(t) e^{Z^{\top}\beta}],

where t is time, Z is covariate, \beta is the coefficient vector, and \Lambda(t) is the cumulative baseline hazard function. We approximate \Lambda(t) in a sieve space constructed by Bernstein polynomials with degree m. By default, m=3. In the end, all model parameters are estimated by the sieve estimators (Sun and Ding, In Press).

The Cox proportional hazards model assumes that the hazard ratio is constant over time, with the form h(t|Z) = h_0(t) e^{Z^{\top}\beta}, where h_0(t) is the baseline hazard function and Z is the covariate vector. This formulation is flexible and allows \Lambda(t) to be approximated using Bernstein polynomials, which can be tuned by the degree parameter m. The degree of Bernstein polynomial m can be selected based on the AIC value to provide an optimal balance between model complexity and fit.

Optimization methods can be all methods (except "Brent") from optim, such as "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN".

Value

a CopulaCenR object summarizing the model. Can be used as an input to general S3 methods including summary, print, coef, logLik, AIC.

Source

Tao Sun, Yunlong Li, Zhengyan Xiao, Ying Ding, Xiaojun Wang (2022). Semiparametric copula method for semi-competing risks data subject to interval censoring and left truncation: Application to disability in elderly. Statistical Methods in Medical Research (Accepted).

Tao Sun, Weijie Liang, Gongzi Zhang, Danhui Yi, Ying Ding, Lihai Zhang (2024). Penalised semi-parametric copula method for semi-competing risks data: Application to hip fracture in elderly. Journal of the Royal Statistical Society Series C: Applied Statistics (Accepted)

Examples

# fit a rc_Clayton_Cox model
data("data_scmprisk_rc")
Clayton_rc <- rc_scmprisk_Cox(data_scmprisk_rc,var_list = c("x1","x2","x3"), copula = "Clayton",
              l1=0, m1 = 3,
              l2=0, m2 = 3, eta_ini_ini = 2,method1a1="Nelder-Mead",method1a2="Nelder-Mead"
              )
Clayton_rc

CopulaCenR documentation built on April 3, 2025, 10:29 p.m.