Learn R Programming

epade (version 0.2.2)

KM.plot.ade: Kaplan-Meier curves

Description

plot Kaplan-Meier survival curves

Usage

KM.plot.ade(time, event, group=NULL, data=NULL, vnames=NULL,
            main="Kaplan-Meier Plot", xlab="Follow-Up Time",
            ylab="Cumulative Survival", xlim=NULL, ylim=NULL, xticks=NULL,
            legendon='bottomleft', lwd=2, lty=1,
            col=NULL, tcol=NULL, bgcol=NULL, pdigs=4,
            CI=FALSE, ycut=TRUE, zenspoints=FALSE, test=FALSE, wall=0)

Arguments

time
  • a numeric vector for time
a character string with the name of time variable in the data.frame

item

  • event
  • a character string with the name of event variable in the data.frame
  • group
  • a character string with the name of the group variable in the data.frame
  • data
  • vnames
  • main
  • xlab
  • ylab
  • xlim
  • ylim
  • xticks
  • legendon
  • "bottom"
  • "bottomleft"
  • "left"
  • "topleft"
  • "top"
  • "topright"
  • "right"
  • "center"
  • lwd
  • lty
  • col
  • tcol
  • bgcol
  • pdigs
  • CI
  • ycut
  • zenspoints
  • test
  • wall

itemize

  • "bottomright"

Details

The p-value comes from a logrank test

Examples

Run this code
times<-  sort(abs(rnorm(1000)))
events<- round(runif(1000))
groups<- round(runif(1000, 0, 3))
KM.plot.ade(times, events,  groups, wall=2)

Run the code above in your browser using DataLab