scurve: A Function That Plots Survival Curves.

View source: R/utils.R

scurveR Documentation

A Function That Plots Survival Curves.

Description

This function takes a survival structure such as produced by function Surv of package survival. Takes a (discretized) vector v, indexed as ss. Performs the Cox proportional hazard rate test of ss against v. It plots the survival curves for each level of v. It also prints the p-value of the log-likelihood test.

Usage

scurve(ss, v, colors = c("deepskyblue", "black", "red"),
  main = "Survival", legend, nb_sign = 3, legend_place = "topright",
  PLOT_LEGEND = TRUE, cex.leg = 1, censoring, ...)

Arguments

ss

A survival structure such as produced by function Surv of package survival.

v

A (discretized) vector indexed as ss.

colors

Colors to interpolate; must be a valid argument to col2rgb().

main

A character string to explicit the title of the plot

legend

A vector of character to explicit the legend of the plot

nb_sign

An integer indicating the number of significant digits to be used

legend_place

A character string to specify where to put the legend

PLOT_LEGEND

A boolean to specifying if legend need to be plotted

cex.leg

A numeric specifying the size of the legend

censoring

date at which data are censored

...

Parameters passed to plot function.


fchuffar/epimedtools documentation built on Feb. 3, 2024, 2:21 a.m.