plot.survcorr | R Documentation |
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", ...)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.