Description Usage Arguments Value Author(s) References See Also Examples
See http://cran.r-project.org/web/packages/superpc/index.html for more details
Usually, this function is not called directly but embedded in a call to customSurv
from the main package survHD
(see examples).
Note that "lambda", if specified, corresponds to the "threshold" argument in superpc.
1 | customSuperPc(Xlearn, Ylearn, learnind,...)
|
Xlearn |
Gene expression data (a |
Ylearn |
Survival Response, an object of class |
learnind |
An index vector specifying the observations that
belong to the learning set. May be |
... |
Further arguments that shall be passed to |
An object of class ModelLearned
.
Levi Waldron lwaldron@hsph.harvard.edu Christoph Bernau bernau@ibe.med.uni-muenchen.de Markus Riester <riester@jimmy.harvard.edu>
Bair E, Tibshirani R: Semi-Supervised Methods to Predict Patient Survival from Gene Expression Data. PLoS Biology 2004, 2:e108.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | require(survHD)
require(survival)
require(survHDExtra)
set.seed(20)
nsamples <- 100
X <- matrix(rnorm(nsamples*1000),nrow=nsamples)
colnames(X) <- make.names(1:ncol(X))
rownames(X) <- make.names(1:nrow(X))
time <- rexp(nsamples)
cens <- sample(0:1,size=nsamples,replace=TRUE)
y <- Surv(time,cens)
ModelLearned<-customSurv(X=X,y=y,learnind=1:75,customSurvModel=customSuperPc)
##linear risk score
predict(ModelLearned@model,newdata=X[-(1:75),],type='lp')
##survival probabilities at each uncensored time
mytimegrid <- sort(c(0.0,y[y[,2]==1,1]))
SurvivalProbs <- predict(ModelLearned,X[-(1:75),],type='SurvivalProbs',timegrid=mytimegrid,gbm=TRUE)@SurvivalProbs
plot(SurvivalProbs,xlab="Time", ylab="Probability of Survival")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.