survRiskPredict {survriskpred}R Documentation

Survival risk prediction

Description

This function implements the survial risk prediction tool in BRB-ArrayTools

Usage

survRiskPredict(exprTrain, covTrain, exprTest = NULL, covTest = NULL,
  geneid, status, tme, geneSelect = "pc", nriskgroups = 2,
  progIndexPerc, cvMethod = "10fold", nperm = 0, landmarktime = 0,
  alpha = 0.001, ncomp = 2, mixing = 1, pcrgenes = 10, projectPath,
  outputName = "SurvivalRiskPrediction", generateHTML = FALSE)

Arguments

exprTrain

matrix/data frame of gene expression data for training samples. Rows are genes and columns are arrays. Its column names must be provided.

covTrain

matrix/data frame of clinical covariates from the training samples. Rows are arrays and columns are clinical covariates. Default is NULL.

exprTest

matrix/data frame of gene expression data for new samples. Rows are genes and columns are arrays. Its column names must be provided.

geneid

matrix/data frame of gene IDs.

status

vector specifying survival status (1 = death, 0 = censored).

tme

vector specifying survival time.

geneSelect

character string of a gene selection method: "pc" for principal component and "pcr" for penalized Cox regression. Default is "pc".

nriskgroups

numeric of the number of risk groups. It can only be 2 or 3. Default is 2.

progIndexPerc

numeric of prognostic index percentile. In 2-risk group case, one percentile values needs to be provided, whereas, in the 3-risk group case, two percentile values need to be provided. Default is 50 for 2-risk group case.

cvMethod

character string of cross validation method. "loocv" for leave-one-out cross validation, and "10fold" for 10-fold cross validation.

nperm

numeric of number of permutation tests. If nperm == 0, no permutation tests will be conducted; otherwise, permutation tests based on log rank statistics will be run. Default is 0.

landmarktime

numeric of landmark time for the ROC curve. If landmarktime=0, median of survival time will be used.

alpha

numeric of the threshold significance level of penalized Cox regression model for selecting the genes to be used in computing the principal components. Default is 0.001.

ncomp

numeric of number of principal components if geneSelect = "pc".

mixing

numeric of the mixing parameter in penalized Cox regression.

pcrgenes

numeric of number of desired genes if geneSelect = "pcr".

projectPath

character string specifying the full project path.

outputName

character string specifying the output folder name. Default is "SurvivalRiskPrediction".

generateHTML

logical. If TRUE, an HTML page will be generated with detailed class prediction results saved in <projectPath>/Output/<outputName>/<outputName>.html; otherwise not.

CovTest

matrix/data frame of clinical covariates from new samples. Rows are arrays and columns are clinical covariates. Default is NULL.

Details

Please see the BRB-ArrayTools manual for details.

Value

A list that may include the following objects:

Examples

#example 1
resList1 <- test.survRiskPredict("Pomeroy")
#example2
data("Pomeroy")
projectPath <- tempdir()
outputName <- "SurvivalRiskPrediction"
generateHTML <- TRUE
resList2 <- survRiskPredict(exprTrain, covTrain, exprTest, covTest,
                           geneId, status, tme, geneSelect = "pc",
                           nriskgroups = 2, progIndexPerc = 50,
                           cvMethod = "10fold", nperm = 0, landmarktime = 0,
                           alpha = .001, ncomp = 2, mixing = 1, pcrgenes = 10,
                           projectPath = projectPath,
                           outputName = outputName, generateHTML)
if (generateHTML)
  browseURL(file.path(projectPath, "Output", outputName,
            paste0(outputName, ".html")))
#example3
data("Perou")
projectPath <- file.path(Sys.getenv("HOME"),"Pomeroy")
outputName <- "SurvivalRiskPrediction"
generateHTML <- TRUE
resList3 <- survRiskPredict(exprTrain, covTrain, exprTest, covTest,
                           geneId, status, tme, geneSelect = "pc",
                           nriskgroups = 2, progIndexPerc = 50,
                           cvMethod = "10fold", nperm = 0, landmarktime = 0,
                           alpha = .001, ncomp = 2, mixing = 1, pcrgenes = 10,
                           projectPath = projectPath,
                           outputName = outputName, generateHTML)
if (generateHTML)
  browseURL(file.path(projectPath, "Output", outputName,
            paste0(outputName, ".html")))

[Package survriskpred version 0.2 Index]