Learn R Programming

saps (version 2.4.2)

rankConcordance: Compute concordance indices

Description

Computes concordance indices for a gene expression data set, and returns the concordance index and the z-score.

Usage

rankConcordance(dataset, survivalTimes, followup)

Arguments

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 dataset.
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 dataSet.

Value

  • The function returns a matrix with two columns:
  • cindexconcordance index estimate.
  • zz-score of the concordance index estimate.
  • and as many rows as dataset. The row names contain the gene identifiers.

Details

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.

See Also

saps concordance.index

Examples

Run this code
# 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)

Run the code above in your browser using DataLab