Learn R Programming

RVAideMemoire (version 0.9-45-2)

plotsurvivors: Survivor curve

Description

Plots the survivor curve (log(survivors) against time) of a dataset to check for constancy of hazard.

Usage

plotsurvivors(x, status = rep(1, length(x)))

Arguments

x
time to event.
status
status (1: event observed, 0: event not observed).

Value

  • ninitial number of individuals.
  • timetime of events.
  • alivenumber of survivors at each time.

Examples

Run this code
# 'kidney' dataset of package 'survival'
require(survival)
data(kidney)
plotsurvivors(kidney$time,kidney$status)

Run the code above in your browser using DataLab