SurvCorr (version 1.0)

survcorr: Correlation Analysis of Survival Times by Iterative Multiple Imputation


This R-package implements the iterative multiple imputation algorithm as proposed by Schemper, Kaider, Wakounig and Heinze (2013) for estimation of a correlation coefficient for bivariate possibly censored time-to-event data.


survcorr(formula1, formula2, 
    data, methods = "imi", alpha = 0.05, intra = FALSE, 
    M = 10, MCMCSteps = 10, epsilon = 0.001, maxiter = 100)


Survival object for first time-to-event variable, e.g. Surv(time1, status1)~1
Survival object for second time-to-event variable, e.g. Surv(time2, status2)~1
Data set to look up variables
Correlation method(s). Currently, only "imi" (iterative multiple imputation) is implemented.
One minus confidence level (for confidence interval computation)
If TRUE, an intraclass correlation coefficient will be computed, assuming that the two time-to-event variables are interchangeable in each observation.
Number of imputations (for IMI)
Number of MCMCSteps (for IMI)
Accuracy of numerical estimation of correlation coefficients
Maximum number of iterations in IMI


  • rhoestimated correlation coefficient
  • ci.lowerlower limit of confidence interval for rho
  • ci.upperupper limit of confidence interval for rho
  • simDataimputed data sets for each iteration, with components M (number of imputations), z1M, z2M (imputed normal deviates), delta1, delta2 (censoring indicators), t1, t2 (imputed non-censored survival times)
  • Mnumber of imputations
  • MCMCStepsnumber of MCMC steps in iterative imputation
  • rj.transthe M atanh-transformed correlation coefficients from M imputed data sets
  • rj.t.meanthe posterior mean of the atanh-transofmred correlation coefficients over the M imputations
  • varthe variance of atanh(rho), with components within, between and total
  • dfthe number of degrees of freedom (important for confidence interval computation)
  • alpha1-confidence level
  • callthe function call (useful for making use of update(obj))


The analysis of correlations within pairs of survival times is of interest to many research topics in medicine, such as the correlation of survival-type endpoints of twins, the correlation of times till failure in paired organs, or the correlation of survival time with a surrogate endpoint. The dependence of such times is assumed monotonic and thus quantification by rank correlation coefficients appropriate. The typical censoring of such times requires more involved methods of estimation and inference as have been developed in recent years. As an alternative to the maximum likelihood methodology for the normal copula approach (NCE) this package implements an iterative multiple imputation (IMI) method which requires only about 0.05% of the computing time of NCE, without sacrificing statistical performance. For IMI, survival probabilities at death or censoring times are first transformed to normal deviates. Then, those deviates which relate to censored times are iteratively augmented, by conditional multiple imputation, until convergence is obtained for the normal scores rank correlation, which is similar to Spearman's rank correlation. Schemper, Kaider, Wakounig and Heinze (2013) compared statistical properties of NCE and IMI by means of a Monte Carlo study and by means of three real data sets; two of them are available in this package.


Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790


## Example 1
obj = survcorr(formula1=Surv(TIME1, STATUS1) ~ 1, formula2=Surv(TIME2, STATUS2) ~ 1, 
  data=kidney, M=1000, MCMCSteps=10, alpha=0.05, epsilon=0.001)

## Example 2
obj = survcorr(formula1=Surv(TIME1, STATUS1) ~ 1, formula2=Surv(TIME2, STATUS2) ~ 1, 
  data=diabetes, M=100, MCMCSteps=10, alpha=0.05, epsilon=0.001)
plot(obj, "times")