Package 'SurvCorr'

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

Help Index


Correlation Analysis of Survival Times by Iterative Multiple Imputation

Description

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.

Details

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.

Author(s)

Meinhard Ploner, Alexandra Kaider and Georg Heinze (e-mail: [email protected])

References

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.


Diabetes Data

Description

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.

Usage

data(diabetes)

Format

A data.frame containing 197 rows.

Source

https://www.mayo.edu/research/documents/diabeteshtml/DOC-10027460/

References

Huster WJ, Brookmeyer R, Self SG. Modelling paired survival data with covariates. Biometrics 1989; 45:145-156.


Kidney Data

Description

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.

Usage

data(kidney)

Format

A data.frame containing 38 rows and 5 variables (ID, time1, status1, time2, status2).

Source

McGilchrist and Aisbett (1991)

References

McGilchrist CA, Aisbett CW.Regression with frailty in survival analysis. Biometrics 1991; 47:461-466.


Plot Correlated Bivariate Survival Times

Description

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.

Usage

## 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", ...)

Arguments

x

an object of class survcorr

what

what should be plotted: "uniform" or "copula" to plot the bivariate copula, "times" to plot the survival times. The default is to plot the copula.

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., imputation=1:5. Default: imputation=1)

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="black").

colImput

Color of symbols representing imputations for censored times (default="gray").

...

Further options to be passed to the plot function.

Value

no return value; function is called for its side effects

Author(s)

Meinhard Ploner, Alexandra Kaider, Georg Heinze

References

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.

Examples

## 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

Description

Print method for survcorr objects (correlation of bivariate survival times). Summarizes most important results: estimated correlation coefficient and confidence interval.

Usage

## S3 method for class 'survcorr'
print(x, ...)

Arguments

x

a survcorr object

...

additional options passed to print

Details

print method for objects of class survcorr

Value

the estimated correlation coefficient and lower and upper (1-alpha) confidence limits

Author(s)

Meinhard Ploner, Alexandra Kaider, Georg Heinze

References

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.


Summary Method for survcorr Objects

Description

Summarizes results of a correlation analysis of bivariate survival times

Usage

## S3 method for class 'survcorr'
summary(object, ...)

Arguments

object

a survcorr object

...

further arguments passed to summary

Details

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.

Value

NULL

Author(s)

Meinhard Ploner, Alexandra Kaider, Georg Heinze

References

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.


Correlation Analysis of Survival Times by Iterative Multiple Imputation

Description

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.

Usage

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

Arguments

formula1

Survival object for first time-to-event variable, e.g. Surv(time1, status1)~1

formula2

Survival object for second time-to-event variable, e.g. Surv(time2, status2)~1

data

Data set to look up variables

methods

Correlation method(s). Currently, only "imi" (iterative multiple imputation) is implemented.

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

Details

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.

Value

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))

Author(s)

Meinhard Ploner, Alexandra Kaider, Georg Heinze

References

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.

Examples

## 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")