plotsurvivors: Survivor curve

View source: R/plotsurvivors.R

plotsurvivorsR Documentation

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

n

initial number of individuals.

time

time of events.

alive

number of survivors at each time.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

Examples

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

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.