Title: | Correlation of Bivariate Survival Times |
---|---|
Description: | Estimates correlation coefficients with associated confidence limits for bivariate, partially censored survival times. Uses the iterative multiple imputation approach proposed by Schemper, Kaider, Wakounig and Heinze (2013) <doi:10.1002/sim.5874>. Provides a scatterplot function to visualize the bivariate distribution, either on the original time scale or as copula. |
Authors: | Georg Heinze [aut, cre], Meinhard Ploner [aut], Alexandra Kaider [aut], Gregor Steiner [aut] |
Maintainer: | Georg Heinze <[email protected]> |
License: | GPL |
Version: | 1.1 |
Built: | 2025-01-13 05:34:41 UTC |
Source: | https://github.com/georgheinze/survcorr |
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.
Package: | SurvCorr |
Type: | Package |
Version: | 1.0 |
Date: | 2015-02-25 |
License: | GPL |
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.
The package's main function is survcorr
, accompanied by appropriate print
and summary
methods. A plot
method can be used to visualize the bivariate distribution either as a copula, or as distribution of survival times. In the former case, one can plot original (uncensored) values along with univariately or bivariately imputed values.
Meinhard Ploner, Alexandra Kaider and Georg Heinze (e-mail: [email protected])
Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790 doi:10.1002/sim.5874.
Diabetic retinopathy: how strongly are times to blindness of a treated and an untreated eye correlated in patients suffering from diabetic retinopathy? The analysis is based on a sample of n=197 paired failure times (censoring 73% and 49% for the treated and untreated eyes, respectively) described by Huster, Brookmeyer, and Self (1989). Both eyes of an individual are observed for the same time, and therefore dots on the diagonal generally indicate pairs of censored times.
data(diabetes)
data(diabetes)
A data.frame containing 197 rows.
https://www.mayo.edu/research/documents/diabeteshtml/DOC-10027460/
Huster WJ, Brookmeyer R, Self SG. Modelling paired survival data with covariates. Biometrics 1989; 45:145-156.
Infections under dialysis: does time until infection of the first application of a portable dialysis machine correlate with the time until recurrence of infection during the second application? The infection occurs at the point of insertion of the catheter, and, when it occurs, the catheter is removed. After successful treatment of the infection, the catheter is reinserted again. In the data set of 38 patients, the times until infection in both periods are reported as well as corresponding censoring indicators. Censoring of the times till infection occurs if the catheter is removed because of other reasons than infection.
data(kidney)
data(kidney)
A data.frame containing 38 rows and 5 variables (ID, time1, status1, time2, status2).
McGilchrist and Aisbett (1991)
McGilchrist CA, Aisbett CW.Regression with frailty in survival analysis. Biometrics 1991; 47:461-466.
Produces a scatterplot of bivariate survival times, either on the original times scale or as copula (uniform marginal distributions). Censored observations are inserted either by their imputed values (copula plot) or marked by arrows (survival times plot). The first time variable will be plotted on the y-axis, the second on the x-axis.
## S3 method for class 'survcorr' plot(x, what = "uniform", imputation = 1, xlab = switch(what, copula= expression(hat(F)(t[2])), uniform = expression(hat(F)(t[2])), times = expression(t[2])), ylab = switch(what, copula = expression(hat(F)(t[1])), uniform = expression(hat(F)(t[1])), times = expression(t[1])), xlim, ylim, main = switch(what, copula = "Bivariate Copula",uniform = "Bivariate Copula", times = "Bivariate Survival Times"), legend = TRUE, cex.legend = switch(what, copula = 0.8, uniform = 0.8, times = 0.7), pch = "*", colEvent = "black", colImput = "gray", ...)
## S3 method for class 'survcorr' plot(x, what = "uniform", imputation = 1, xlab = switch(what, copula= expression(hat(F)(t[2])), uniform = expression(hat(F)(t[2])), times = expression(t[2])), ylab = switch(what, copula = expression(hat(F)(t[1])), uniform = expression(hat(F)(t[1])), times = expression(t[1])), xlim, ylim, main = switch(what, copula = "Bivariate Copula",uniform = "Bivariate Copula", times = "Bivariate Survival Times"), legend = TRUE, cex.legend = switch(what, copula = 0.8, uniform = 0.8, times = 0.7), pch = "*", colEvent = "black", colImput = "gray", ...)
x |
an object of class |
what |
what should be plotted: |
imputation |
If the copula is plotted, then the index of the imputated data set to be used to replace censored observation can be given (e.g., |
xlab |
An optional x-axis label. |
ylab |
An optional y-axis label. |
xlim |
Optional limits for x-axis. |
ylim |
Optional limits for y-axis. |
main |
Optional title. |
legend |
Optional legend. |
cex.legend |
Optional font size of legend. |
pch |
Optional plot character. |
colEvent |
Color of symbols representing uncensored times (default= |
colImput |
Color of symbols representing imputations for censored times (default= |
... |
Further options to be passed to the |
no return value; function is called for its side effects
Meinhard Ploner, Alexandra Kaider, Georg Heinze
Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790 doi:10.1002/sim.5874.
## Example 2 data(diabetes) 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") plot(obj, "copula", imputation=1) plot(obj, "copula", imputation=7)
## Example 2 data(diabetes) 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") plot(obj, "copula", imputation=1) plot(obj, "copula", imputation=7)
Print method for survcorr
objects (correlation of bivariate survival times). Summarizes most important results: estimated correlation coefficient and confidence interval.
## S3 method for class 'survcorr' print(x, ...)
## S3 method for class 'survcorr' print(x, ...)
x |
a survcorr object |
... |
additional options passed to |
print method for objects of class survcorr
the estimated correlation coefficient and lower and upper (1-alpha) confidence limits
Meinhard Ploner, Alexandra Kaider, Georg Heinze
Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790 doi:10.1002/sim.5874.
Summarizes results of a correlation analysis of bivariate survival times
## S3 method for class 'survcorr' summary(object, ...)
## S3 method for class 'survcorr' summary(object, ...)
object |
a survcorr object |
... |
further arguments passed to summary |
Summarizes the results of a correlation analysis of bivariate survival times. Beside of the calculated correlation coefficient and its confidence interval, a contingency table of the bivariate event status, some of the most important input parameters, as well as posterior mean and variance of the transformed correlation coefficients are printed.
NULL
Meinhard Ploner, Alexandra Kaider, Georg Heinze
Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790 doi:10.1002/sim.5874.
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)
survcorr(formula1, formula2, data, methods = "imi", alpha = 0.05, intra = FALSE, M = 10, MCMCSteps = 10, epsilon = 0.001, maxiter = 100)
formula1 |
Survival object for first time-to-event variable, e.g. |
formula2 |
Survival object for second time-to-event variable, e.g. |
data |
Data set to look up variables |
methods |
Correlation method(s). Currently, only |
alpha |
One minus confidence level (for confidence interval computation) |
intra |
If TRUE, an intraclass correlation coefficient will be computed, assuming that the two time-to-event variables are interchangeable in each observation. |
M |
Number of imputations (for IMI) |
MCMCSteps |
Number of MCMCSteps (for IMI) |
epsilon |
Accuracy of numerical estimation of correlation coefficients |
maxiter |
Maximum number of iterations in IMI |
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.
rho |
estimated correlation coefficient |
ci.lower |
lower limit of confidence interval for rho |
ci.upper |
upper limit of confidence interval for rho |
simData |
imputed 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) |
M |
number of imputations |
MCMCSteps |
number of MCMC steps in iterative imputation |
rj.trans |
the M atanh-transformed correlation coefficients from M imputed data sets |
rj.t.mean |
the posterior mean of the atanh-transofmred correlation coefficients over the M imputations |
var |
the variance of atanh(rho), with components within, between and total |
df |
the number of degrees of freedom (important for confidence interval computation) |
alpha |
1-confidence level |
call |
the function call (useful for making use of update(obj)) |
Meinhard Ploner, Alexandra Kaider, Georg Heinze
Schemper,M., Kaider,A., Wakounig,S. & Heinze,G. (2013): "Estimating the correlation of bivariate failure times under censoring", Statistics in Medicine, 32, 4781-4790 doi:10.1002/sim.5874.
## Example 1 data(kidney) 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 data(diabetes) 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")
## Example 1 data(kidney) 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 data(diabetes) 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")