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

pamr.plotstrata

A function to plot the survival curves in each Kaplan Meier stratum


Description

A function to plot the survival curves in each Kaplan Meier stratum

Usage

pamr.plotstrata(fit, survival.time, censoring.status)

Arguments

fit

The result of a call to pamr.train

survival.time

Vector of survival times

censoring.status

Vector of censoring status values

Author(s)

Trevor Hastie,Robert Tibshirani, Balasubramanian Narasimhan, and Gilbert Chu

Examples

gendata<-function(n=100, p=2000){
  tim <- 3*abs(rnorm(n))
  u<-runif(n,min(tim),max(tim))
  y<-pmin(tim,u)
   ic<-1*(tim<u)
m <- median(tim)
x<-matrix(rnorm(p*n),ncol=n)
  x[1:100, tim>m] <-  x[1:100, tim>m]+3
  return(list(x=x,y=y,ic=ic))
}

# generate training data; 2000 genes, 100 samples

junk<-gendata(n=100)
y<-junk$y
ic<-junk$ic
x<-junk$x
d <- list(x=x,survival.time=y, censoring.status=ic,
geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep=
""))

# train model
a3<- pamr.train(d, ngroup.survival=2)


pamr.plotstrata(a3, d$survival.time, d$censoring.status)

pamr

Pam: Prediction Analysis for Microarrays

v1.56.1
GPL-2
Authors
T. Hastie, R. Tibshirani, Balasubramanian Narasimhan, Gil Chu
Initial release

We don't support your browser anymore

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