superpc.rainbowplot: Make rainbow plot of superpc and compeiting predictors

Description Usage Arguments Details Author(s) References Examples

View source: R/superpc.rainbowplot.R

Description

Makes a heatmap display of outcome predictions from superpc, along with expected survival time, and values of competing predictors.

Usage

1
2
3
4
5
    superpc.rainbowplot(data, 
                        pred, 
                        sample.labels,
                        competing.predictors,
                        call.win.metafile=FALSE)

Arguments

data

List of (test) data, of form described in superpc.train documentation

pred

Superpc score from superpc.predict or superpc.predict.red

sample.labels

Vector of sample labels of test data

competing.predictors

List of competing predictors to be plotted

call.win.metafile

Used only by Excel interface call to function

Details

Any censored survival times are estimated by E(T|T > C), where $C$ is the observed censoring time and the Kaplan-Meier estimate from the training set is used to estimate the expectation.

Author(s)

Maintainer: "Jean-Eudes Dazard, Ph.D."

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
set.seed(332)

#generate some data
x <- matrix(rnorm(50*30), ncol=30)
y <- 10 + svd(x[1:50,])$v[,1] + .1*rnorm(30)
ytest <- 10 + svd(x[1:50,])$v[,1] + .1*rnorm(30)
censoring.status <- sample(c(rep(1,20), rep(0,10)))
censoring.status.test <- sample(c(rep(1,20), rep(0,10)))

featurenames <- paste("feature", as.character(1:50), sep="")
competing.predictors.test <- list(pred1=rnorm(30), 
                                  pred2=as.factor(sample(c(1,2),
                                                  replace=TRUE,
                                                  size=30)))
                                                  
data <- list(x=x, 
             y=y, 
             censoring.status=censoring.status, 
             featurenames=featurenames)
data.test <- list(x=x, 
                  y=ytest, 
                  censoring.status=censoring.status.test, 
                  featurenames=featurenames)
sample.labels <- paste("te", as.character(1:20), sep="")

a <- superpc.train(data, type="survival")
pred <- superpc.predict(a, 
                        data, 
                        data.test, 
                        threshold=.25, 
                        n.components=1)$v.pred
superpc.rainbowplot(data, 
                    pred, 
                    sample.labels, 
                    competing.predictors=competing.predictors.test)

superpc documentation built on Oct. 24, 2020, 1:07 a.m.