plot_km: Visualization of Survival Distributions

View source: R/PRIMsrc.r

plot_kmR Documentation

Visualization of Survival Distributions

Description

Function for plotting the cross-validated survival distributions of a sbh object. It plots the cross-validated Kaplan-Meir estimates of survival distributions either between higher-risk (in-bump) versus lower-risk (out-bump) bumps of observations (bump difference, PRSP algorithm), or between two specified fixed groups (group difference, PRGSP algorithm). The plot is done for a user-specified number of steps of the peeling sequence, i.e. peeling step of the inner loop of the Patient Recursive Survival Peeling (PRSP) or of the Patient Recursive Group Survival Peeling (PRGSP) algorithm of the sbh object.

Usage

  plot_km(object,
          main = "Survival KM Plots",
          xlab = "Time",
          ylab = "Probability",
          ci = TRUE,
          precision = 1e-3,
          mark = 3,
          col = c(1,2),
          lty = 1,
          lwd = 0.5,
          cex = 0.5,
          steps = 1:object$cvfit$cv.nsteps,
          plot.type = "bumps",
          bump.reference = "in-bump",
          group.reference = levels(object$groups)[1],
          add.caption = TRUE,
          text.caption = c("out-bump","in-bump"), 
          nr = 3, 
          nc = 4,
          device = NULL, 
          file = "Survival KM Plots", 
          path = getwd(), 
          horizontal = TRUE, 
          width = 11,
          height = 8.5, ...)

Arguments

object

Object of class sbh as generated by the main function sbh.

main

Character vector. Main Title. Defaults to "Survival KM Plots".

xlab

Character vector. X-axis label. Defaults to "Time".

ylab

Character vector. Y-axis label. Defaults to "Probability".

ci

Logical scalar. Shall the 95% confidence interval be plotted? Defaults to TRUE.

precision

Precision of 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 outbox curves. Defaults to 3.

col

Integer scalar specifying the color of the inbox and outbox curves (Defaults to c(1,2)).

lty

Integer scalar. Line type for the survival curve. Defaults to 1.

lwd

Numeric scalar. Line width for the survival curve. Defaults to 0.5.

cex

Numeric scalar specifying the size of the marks, symbol expansion used for titles, captions, and axis labels. Defaults to 0.5.

steps

Integer vector. Vector of peeling steps at which to plot the survival curves. Defaults to all the peeling steps of sbh object object.

plot.type

Character vector of plot type in {"bumps", "groups"} for plotting survival curves between ("out-bump","in-bump") or between the fixed groups (levels(object$groups)), respectively. Defaults to "bumps".

bump.reference

Character vector in {"out-bump","in-bump"} of which bump is taken as the reference for plotting survival curves. Defaults to "in-bump".

group.reference

Character vector of which of the fixed groups is taken as the reference for plotting survival curves. Defaults to levels(object$groups)[1].

add.caption

Logical scalar. Shall the caption be plotted? Defaults to TRUE.

text.caption

Character vector of caption content. Defaults to {"out-bump","in-bump"}.

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

Character vector of 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

Character vector of file name for output graphic. Defaults to "Survival Plots".

path

Character vector of 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).

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.

The plot is done for the given peeling criterion (object$cvarg$peelcriterion) of the sbh object. If a regular hunt of bump difference is done (peelcriterion in {"lrt", "lhr", "chs"}), cross-validated Kaplan-Meir estimates (KM curves) are plotted between observations from the highest risk bump (in-bump) versus lower-risk bump (out-bump). If a hunt of (user-specified) fixed group difference is done (peelcriterion in {"bwgrp", "bwbmp"}), KM curves are plotted either: (i) between observations of both groups within the highest risk bump (in-bump) ("bwgrp"), or similarly, (ii) between observations from the highest risk bump (in-bump) versus lower-risk bump (out-bump) within a given group ("bwbmp").

Cross-validated LRT, LHR values and log-rank p-values of separation between bumps or groups 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.

Value

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

Acknowledgments

This work made use of the High Performance Computing Resource in the Core Facility for Advanced Research Computing at Case Western Reserve University. This project was partially funded by the National Institutes of Health NIH - National Cancer Institute (R01-CA160593) to J-E. Dazard and J.S. Rao.

Note

End-user plotting function.

Author(s)

Maintainer: "Jean-Eudes Dazard, Ph.D." jean-eudes.dazard@case.edu

References

  • Dazard J-E. and Rao J.S. (2021a). "Variable Selection Strategies for High-Dimensional Recursive Peeling-Based Survival Bump Hunting Models." (in prep).

  • Dazard J-E. and Rao J.S. (2021b). "Group Bump Hunting by Recursive Peeling-Based Methods: Application to Survival/Risk Predictive Models." (in prep).

  • Dazard J-E., Choe M., Pawitan Y., and Rao J.S. (2021c). "Identification and Characterization of Informative Prognostic Subgroups by Survival Bump Hunting." (in prep).

  • Rao J.S., Huilin Y., and Dazard J-E. (2020). "Disparity Subtyping: Bringing Precision Medicine Closer to Disparity Science." Cancer Epidemiology Biomarkers & Prevention, 29(6 Suppl):C018.

  • Yi C. and Huang J. (2017). "Semismooth Newton Coordinate Descent Algorithm for Elastic-Net Penalized Huber Loss Regression and Quantile Regression." J. Comp Graph. Statistics, 26(3):547-557.

  • Dazard J-E., Choe M., LeBlanc M., and Rao J.S. (2016). "Cross-validation and Peeling Strategies for Survival Bump Hunting using Recursive Peeling Methods." Statistical Analysis and Data Mining, 9(1):12-42.

  • 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, p. 650-664.

  • 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.

See Also

  • plot.survfit (R package survival)


jedazard/PRIMsrc documentation built on July 16, 2022, 10:56 p.m.