plot.cif {surv2sample} | R Documentation |
Plot cumulative incidence functions for one or more samples of censored data with several competing risks (types of failure).
## S3 method for class 'cif': plot(x, by = "group", aggreg.cif = TRUE, orient = "land", lwds = 1, cols = 1, ltys = if ((by == "cause") || (by == "c")) rep(1:6, len = x$ngroups) else 1, xlab = "", ylab = "", ylim, mfrow, mfcol, mains, ...)
x |
an object of class "cif" , as returned by cif . |
by |
If "group" or "g" , for every group one plot containing
all cumulative incedence functions is produced. If "cause" or "c" ,
for every cause one plot conatining CIFs for all groups is produced. |
aggreg.cif |
logical. Used only when curves are plotted by group. If
aggreg.cif is TRUE , a summary plot with aggregate CIFs in
each group is produced. This means that in each plot the lowest curve
is the CIF for cause 1, the second lowest is the sum of CIFs for causes 1
and 2, etc. The area above the top curve is the disease-free survival. |
orient |
If "land" , multiple plots are arranged to give
a landscape plot. Otherwise a portrait orientation is assumed.
orient is ignored, if mfrow or mfcol is
present. |
lwds, cols, ltys |
vectors of length equal to the number of curves in plots (number of groups or number of causes). These give line widths, colours and line types for each curve. |
xlab,ylab |
labels for axes. |
ylim |
limits on the vertical axis. If missing, determined automatically. |
mfrow, mfcol |
parameters determining the arrangement of
plots, passed to par . |
mains |
the main title(s) for plots. If missing, titles for
plots are automatically produced. If mains is present, it
must be of length equal to the number of plots or 1 (in which case it
is replicated). |
... |
other standard parameters for plotting. |
David Kraus (http://www.davidkraus.net/)
## bone marrow transplant data data(bmt1) ## plot aggregate cumulative incidence functions for each ## donor type, i.e., plotting by groups, to see the probability ## structure within groups plot(cif(Survcomp(bmt1$time, bmt1$event), bmt1$donor)) ## plot CIFs by causes, to compare donor type effects on each ## cause of failure plot(cif(Survcomp(bmt1$time, bmt1$event), bmt1$donor), by = "cause")