Description Usage Arguments Details Value See Also Examples
Computes concordance indices for a gene expression data set, and returns the concordance index and the z-score.
1 | rankConcordance(dataset, survivalTimes, followup)
|
dataset |
A matrix, where the column names are gene identifiers and the values are gene expression levels. Each row should contain data for a single patient. |
survivalTimes |
A vector of survival times. The length must equal the number of
rows (i.e. patients) in |
followup |
A vector of 0 or 1 values, indicating whether the patient was
lost to followup (0) or not (1). The length must equal the number of rows
(i.e. patients) in |
This function is a wrapper for
concordance.index
in the survcomp
package. It applies the latter over the columns of dataset
to
calculate concordance indices and the corresponding z-score for each gene.
The function returns a matrix with two columns:
cindex |
concordance index estimate. |
z |
z-score of the concordance index estimate. |
and as many rows as dataset
. The row names contain the gene identifiers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # 25 patients, none lost to followup
followup <- rep(1, 25)
# first 5 patients have good survival (in days)
time <- c(25, 27, 24, 21, 26, sample(1:3, 20, TRUE))*365
# create data for 100 genes, 25 patients
dat <- matrix(rnorm(25*100), nrow=25, ncol=100)
colnames(dat) <- as.character(1:100)
ci <- rankConcordance(dat, time, followup)
z <- ci[,"z"]
range(z)
hist(z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.