Learn R Programming

PRIMsrc (version 0.6.3)

plot_boxkm: Visualization of Survival Distributions

Description

Function for plotting the cross-validated survival distributions of a PRSP object. Plot the cross-validated Kaplan-Meir estimates of survival distributions for the highest risk (inbox) versus lower-risk (outbox) groups of samples at each iteration of the peeling sequence (inner loop of our PRSP algorithm).

Usage

plot_boxkm(object,
             main = NULL, 
             xlab = "Time", 
             ylab = "Probability",
             precision = 1e-3, 
             mark = 3, 
             col = 2, 
             cex = 1,
             steps = 1:object$cvfit$cv.nsteps,
             nr = 3, 
             nc = 4,
             device = NULL, 
             file = "Survival Plots", 
             path=getwd(), 
             horizontal = TRUE, 
             width = 11, 
             height = 8.5, ...)

Arguments

object
Object of class PRSP as generated by the main function sbh.
main
Character vector. Main Title. Defaults to NULL.
xlab
Character vector. X axis label. Defaults to "Time".
ylab
Character vector. Y axis label. Defaults to "Probability".
precision
Precision of cross-validated log-rank p-values of separation between two survival curves. Defaults to 1e-3.
mark
Integer scalar of mark parameter, which will be used to label the inbox and out-of-box curves. Defaults to 3.
col
Integer scalar specifying the color of the inbox curve. Defaults to 2.
cex
Numeric scalar specifying the size of the marks. Defaults to 1.
steps
Integer vector. Vector of peeling steps at which to plot the survival curves. Defaults to all the peeling steps of PRSP object object.
nr
Integer scalar of the number of rows in the plot. Defaults to 3.
nc
Integer scalar of the number of columns in the plot. Defaults to 4.
device
Graphic display device in {NULL, "PS", "PDF"}. Defaults to NULL (standard output screen). Currently implemented graphic display devices are "PS" (Postscript) or "PDF" (Portable Document Format).
file
File name for output graphic. Defaults to "Survival Plots".
path
Absolute path (without final (back)slash separator). Defaults to the working directory path.
horizontal
Logical scalar. Orientation of the printed image. Defaults to TRUE, that is potrait orientation.
width
Numeric scalar. Width of the graphics region in inches. Defaults to 11.
height
Numeric scalar. Height of the graphics region in inches. Defaults to 8.5.
Generic arguments passed to other plotting functions, including plot.survfit (R package survival).

Value

Invisible. None. Displays the plot(s) on the specified device.

Details

Some of the plotting parameters are further defined in the function plot.survfit (R package survival). Step #0 always corresponds to the situation where the starting box covers the entire test-set data before peeling. Cross-validated LRT, LHR of inbox samples and log-rank p-values of separation are shown at the bottom of the plot with the corresponding peeling step. P-values are lower-bounded by the precision limit given by \(1/A\), where \(A\) is the number of permutations.

References

  • Dazard J-E., Choe M., LeBlanc M. and Rao J.S. (2015). "Cross-validation and Peeling Strategies for Survival Bump Hunting using Recursive Peeling Methods." Statistical Analysis and Data Mining (in press).
  • Dazard J-E., Choe M., LeBlanc M. and Rao J.S. (2014). "Cross-Validation of Survival Bump Hunting by Recursive Peeling Methods." In JSM Proceedings, Survival Methods for Risk Estimation/Prediction Section. Boston, MA, USA. American Statistical Association IMS - JSM, p. 3366-3380.
  • Dazard J-E., Choe M., LeBlanc M. and Rao J.S. (2015). "R package PRIMsrc: Bump Hunting by Patient Rule Induction Method for Survival, Regression and Classification." In JSM Proceedings, Statistical Programmers and Analysts Section. Seattle, WA, USA. American Statistical Association IMS - JSM, (in press).
  • Dazard J-E. and J.S. Rao (2010). "Local Sparse Bump Hunting." J. Comp Graph. Statistics, 19(4):900-92.

See Also

  • plot.survfit (R package survival)

Examples

Run this code
#===================================================
# Loading the library and its dependencies
#===================================================
library("PRIMsrc")

#=================================================================================
# Simulated dataset #1 (n=250, p=3)
# Non Replicated Combined Cross-Validation (RCCV)
# Peeling criterion = LRT
# Optimization criterion = LRT
#=================================================================================
CVCOMB.synt1 <- sbh(dataset = Synthetic.1, 
                    cvtype = "combined", cvcriterion = "lrt",
                    B = 1, K = 5, 
                    vs = TRUE, cpv = FALSE, 
                    decimals = 2, probval = 0.5, 
                    arg = "beta=0.05,
                           alpha=0.1,
                           minn=10,
                           L=NULL,
                           peelcriterion=\"lr\"",
                    parallel = FALSE, conf = NULL, seed = 123)

plot_boxkm(object = CVCOMB.synt1,
           main = paste("Cross-validated probability curves for model #1", sep=""),
           xlab = "Time", ylab = "Probability",
           device = NULL, file = "Survival Plots", path=getwd(),
           horizontal = TRUE, width = 11, height = 8.5)

Run the code above in your browser using DataLab