Learn R Programming

SurvCorr (version 1.1)

plot.survcorr: 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 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", ...)

Value

no return value; function is called for its side effects

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.

Author

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 tools:::Rd_expr_doi("10.1002/sim.5874").

Examples

Run this code
## 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)

Run the code above in your browser using DataLab