surv_data_dc {survivalMPLdc}R Documentation

Generate a sample of time to event dataset with dependent right censoring under an Archimedean copula

Description

Generate a sample of time to event dataset with, dependent right censoring based on one of the Archimedean copulas the given Kendall's tau, sample size n and covariates matrix Z.

Usage

surv_data_dc(n, a, Z, lambda, betas, phis, cons7, cons9, tau, copula, distr.ev, distr.ce)

Arguments

n

the sample size, or the number of the subjects in a sample.

a

the shape parameter of baseline hazard for the event time TT.

Z

the covariate matrix with dimension of nn by pp, where pp is the number of covariates.

lambda

the scale parameter of baseline hazard for event time TT.

betas

the regression coefficient vector of proportional hazard model for the event time TT with dimenion of pp by 11.

phis

the regression coefficient vector of proportional hazard model for dependent censoring time CC with dimenion of pp by 11.

cons7

the parameter of baseline hazard for the dependent censoring time CC if assuming an exponential distribution.

cons9

the upper limit parameter of uniform distribution for the independent censoring time AA, i.e. AA~U(0, cons9).

tau

the Kendall's correlation coefficient between TT and CC.

copula

the Archemedean copula that captures the dependence between TT and CC, a characteristc value, i.e. 'independent', 'clayton', 'gumbel' or 'frank'.

distr.ev

the distribution of the event time, a characteristc value, i.e. 'weibull' or 'log logit'.

distr.ce

the distribution of the dependent censoring time, a characteristc value, i.e. 'exponential' or 'weibull'.

Details

surv_data_dc allows to generate a survival dataset under dependent right censoring, at sample size n, based on one of the Archimedean copula, Kendall's tau, and covariates matrix Z with dimension of nn by pp. For example, at p=2, we have Z=cbind(Z1, Z2), where Z1 is treatment generated by distribution of bernoulli(0.5), i.e. 1 represents treatment group and 0 represents control group; Z2 is the age generated by distribution of U(-10, 10).

The generated dataset includes three varaibles, which are XiX_i, δi\delta_i and ηi\eta_i, i.e. Xi=min(Ti,Ci,Ai)X_i=min(T_i, C_i, A_i), δi=I(Xi=Ti)\delta_i=I(X_i=T_i) and ηi=I(Xi=Ci)\eta_i=I(X_i=C_i), for i=1,,ni=1,\ldots,n. 'T' represents the event time, whose hazard function is

hT(x)=h0T(x)exp(Zβ)h_T(x)=h_{0T}(x)exp(Z^{\top}\beta)

, where the baseline hazard can take weibull form, i.e. h0T(x)=axa1/λah_{0T}(x) = ax^{a-1} / \lambda^a, or log logistic form, i.e.

h0T(x)=1aexp(λ)(xexp(λ))1/a11+(xexp(λ))1/a h_{0T}(x) = \frac{ \frac{ 1 }{ a exp( \lambda ) } ( \frac{ x }{ exp( \lambda ) } )^{1/a -1 } }{ 1 + ( \frac{ x }{ exp( \lambda ) } )^{1/a} }

. 'C' represents the dependent censoring time, whose hazard function is hC(x)=h0C(x)exp(Zϕ) h_{C}(x) = h_{0C}(x)exp( Z^{\top}\phi) , where the baseline hazard can take exponential form, i.e. h0C(x)=cons7h_{0C}(x)=cons7, or weibull form, i.e. h0C(x)=axa1/λah_{0C}(x) = ax^{a-1} / \lambda^a.'A' represents the administrative or independent censoring time, where A~U(0, cons9).

Value

A sample of time to event dataset under dependent right censoring, which includes observed time XX, event indicator δ\delta and dependent censoring indicator η\eta.

Author(s)

Jing Xu, Jun Ma, Thomas Fung

References

Xu J, Ma J, Connors MH, Brodaty H. (2018). "Proportional hazard model estimation under dependent censoring using copulas and penalized likelihood". Statistics in Medicine 37, 2238–2251.

See Also

coxph_mpl_dc

Examples

 ##-- Copula types
 copula3 <- 'frank'

 ##-- Marginal distribution for T, C, and A
 a <- 2
 lambda <- 2
 cons7 <- 0.2
 cons9 <- 10
 tau <- 0.8
 betas <- c(-0.5, 0.1)
 phis <- c(0.3, 0.2)
 distr.ev <- 'weibull'
 distr.ce <- 'exponential'

 ##-- Sample size
 n <- 200

 ##-- One sample Monte Carlo dataset
 cova <- cbind(rbinom(n, 1, 0.5), runif(n, min=-10, max=10))
 surv <- surv_data_dc(n, a, cova, lambda, betas, phis, cons7, cons9,
                     tau, copula3, distr.ev, distr.ce)
 n <- nrow(cova)
 p <- ncol(cova)
 ##-- event and dependent censoring proportions
 colSums(surv)[c(2,3)]/n
 X <- surv[,1] # Observed time
 del<-surv[,2] # failure status
 eta<-surv[,3] # dependent censoring status



[Package survivalMPLdc version 0.1.1 Index]