km: Plots an 'enhanced' Kaplan-Meier plot, with base graphics...

Description Usage Arguments Value

Description

This function plots a Kaplan-Meier plot.

Usage

1
2
3
4
5
 km(time=NULL, status=NULL, strata=NULL,
time.unit=c("days","weeks","months","years"), time.by=NULL, main="",
ylab=NULL, xlab=NULL, xlim=NULL, conf.int=NULL,
test=c("logr","hr","both","no"), plot.n.at.risk=TRUE, gr.legend=NULL,
...  ) 

Arguments

time

survival time variable

status

survival indicator variable

strata

Stratifying variable (optional)

time.unit

Time unit of x axis

time.by

Time step x axis (in days)

main

Graph main title

ylab

Y-axis label.

xlab

X-axis label. If NULL a suitable default based on time.unit will be provided

xlim

X-axis limit. If NULL a suitable default based on time.unit will be provided

conf.int

logical ... Plot confidence intervall? If NULL confidence interval are plotted only if strata has two or more levels

test

tests: 'no'=don't plot tests, 'logr'=logranktest, 'hr'=hazratio, 'both'=both

plot.n.at.risk

Logical value: plot number at risk?

gr.legend

Graph command to add legend, as string

...

Further lines.survfit params

Value

The function plot the graph and return a list with km statistics


yapomif documentation built on May 2, 2019, 4:51 p.m.