Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

atRisk

Drawing numbers of subjects at-risk of experiencing an event below Kaplan-Meier and Aalen-Johansen plots.


Description

This function is invoked and controlled by plot.prodlim.

Usage

atRisk(x, newdata, times, line, col, labelcol = NULL, interspace, cex,
  labels, title = "", titlecol = NULL, pos, adj, dist,
  adjust.labels = TRUE, show.censored = FALSE, ...)

Arguments

x

an object of class ‘prodlim’ as returned by the prodlim function.

newdata

see plot.prodlim

times

Where to compute the atrisk numbers.

line

Distance of the atrisk numbers from the inner plot.

col

The color of the text.

labelcol

The color for the labels. Defaults to col.

interspace

Distance between rows of atrisk numbers.

cex

Passed on to mtext for both atrisk numbers and labels.

labels

Labels for the at-risk rows.

title

Title for the at-risk labels

titlecol

The color for the title. Defaults to 1 (black).

pos

The value is passed on to the mtext argument at for the labels (not the atriks numbers).

adj

Passed on to mtext for the labels (not the atriks numbers).

dist

If line is missing, the distance of the upper most atrisk row from the inner plotting region: par()$mgp[2].

adjust.labels

If TRUE the labels are left adjusted.

show.censored

If TRUE the cumulative number of subjects lost to follow up is shown in parentheses.

...

Further arguments that are passed to the function mtext.

Details

This function should not be called directly. The arguments can be specified as atRisk.arg in the call to plot.prodlim.

Value

Nil

Author(s)

Thomas Alexander Gerds <tag@biostat.ku.dk>

See Also


prodlim

Product-Limit Estimation for Censored Event History Analysis

v2019.11.13
GPL (>= 2)
Authors
Thomas A. Gerds
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.